Skip to content
Advertisement

Python Twitter bot with Tweepy: mentions_timeline() takes 1 positional argument but 2 were given

I’m trying to code a bot for Twitter using Tweepy, and I get this error: mentions_timeline() takes 1 positional argument but 2 were given with this line:

mentions = api.mentions_timeline(last_seen_id, tweet_mode = 'extended')

I can’t take away the last_seen_id, so I don’t know how to resolve this.

Advertisement

Answer

Tweepy v4.0.0 changed the since_id parameter for API.mentions_timeline to be a keyword-only argument.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement