Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api.get_lists()[0].members() fails with TypeError: API.get_list_members() takes 1 positional argument but 3 were given #1987

Closed
5j9 opened this issue Oct 20, 2022 · 0 comments
Labels
Bug This is regarding a bug with the library

Comments

@5j9
Copy link

5j9 commented Oct 20, 2022

I believe the issue is that members is calling it with positional ones:

tweepy/tweepy/models.py

Lines 205 to 208 in 33e444a

def members(self, **kwargs):
return self._api.get_list_members(
self.user.screen_name, self.slug, **kwargs
)

bug get_list_members only accepts keyword arguments:

def get_list_members(self, **kwargs):

I resolved the issue by changing the code to:

    def members(self, **kwargs):
        return self._api.get_list_members(
            list_id=self.id, **kwargs
        )
@Harmon758 Harmon758 added the Bug This is regarding a bug with the library label Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is regarding a bug with the library
Projects
None yet
Development

No branches or pull requests

2 participants