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

Cursor + JSONParser + followers_ids() #514

Open
mikepqr opened this issue Nov 24, 2014 · 1 comment
Open

Cursor + JSONParser + followers_ids() #514

mikepqr opened this issue Nov 24, 2014 · 1 comment
Labels
Bug This is regarding a bug with the library

Comments

@mikepqr
Copy link

mikepqr commented Nov 24, 2014

I'm having trouble wrapping api.followers_ids with Cursor when the api parser is JSONParser(). Here's an example. Not sure if this is a problem with other API calls. Any ideas?

api = tweepy.API(auth, parser=tweepy.parsers.JSONParser())
for f in Cursor(api.followers_ids).items():
    print f

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-56-df1d83b05c72> in <module>()
----> 1 for f in Cursor(api.followers_ids).items():
      2     print f
      3 

/Users/mike/miniconda/lib/python2.7/site-packages/tweepy/cursor.pyc in next(self)
    183         self.page_index += 1
    184         self.num_tweets += 1
--> 185         return self.current_page[self.page_index]
    186 
    187     def prev(self):

KeyError: 0
@mikepqr mikepqr changed the title Cursor + JSONParser + api.followers_ids() Cursor + JSONParser + followers_ids() Nov 24, 2014
@oussjarrousse
Copy link

I am getting that as well in 3.5

@Harmon758 Harmon758 added the Bug This is regarding a bug with the library label Jan 3, 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

3 participants