Reputation: 11
api = tweepy.API(auth)
# using get_user with id
_id = "103770785"
user = api.get_user(_id)
# printing the name of the user
print("The id " + _id + " corresponds to the user with the name : " + user.name)
That is my code. I can't find the solution for this message: TypeError: get_user() takes 1 positional argument but 2 were given
Upvotes: 0
Views: 1479
Reputation: 5157
API.get_user
doesn't accept any positional arguments.
The one being referred to in the error is self
.
You'll want to pass _id
as the user_id
kwarg.
See the relevant FAQ section in Tweepy's documentation.
Upvotes: 0