api.user_timeline not working anymore

47 views
Skip to first unread message

Enrico

unread,
Oct 20, 2013, 1:16:44 PM10/20/13
to twe...@googlegroups.com
Hi all,
my browser crashed while sending this message the first time, so I apologise if it's a double post.

I was using tweepy v2.1 with no issues until 3 days ago. In particular everytime I call the api.user_timeline
with a Cursor, it ends up with an exception, no matter what arguments I pass to it. So I simplified my
code to dig into the bug until I came up with the simplest possible case, that is:

                for status in tweepy.Cursor(self.api.user_timeline).items():
                  print status

And I get the following exception (it doesn't matter if I pass to the function an id, user_id, screen_name
or whatnot, same thing goes if I use pages()) as soon as the code hits the Cursor:

Traceback (most recent call last):
    File "/Users/.../twitter_data.py", line 253, in get_timeline
        for status in tweepy.Cursor(self.api.user_timeline).items():
    File "/Users/.../anaconda/lib/python2.7/site-packages/tweepy/cursor.py", line 152, in next
        self.current_page = self.page_iterator.next()
    File "/Users/.../anaconda/lib/python2.7/site-packages/tweepy/cursor.py", line 100, in next
        self.max_id = data.max_id
AttributeError: 'list' object has no attribute 'max_id'

I also ran the test suites provided with tweepy on 3 different tokens, so I don't get rate limited, 
with full read/write access:

======================================================================
FAIL: testcursorcursoritems (tests.test_cursors.TweepyCursorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/.../tweepy/tests/test_cursors.py", line 22, in testcursorcursoritems
    self.assertEqual(len(items), 10)
AssertionError: 0 != 10

======================================================================
FAIL: testcursorcursorpages (tests.test_cursors.TweepyCursorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/.../tweepy/tests/test_cursors.py", line 29, in testcursorcursorpages
    self.assert_(len(pages) == 1)
AssertionError: False is not true

======================================================================
FAIL: testidcursoritems (tests.test_cursors.TweepyCursorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/.../tweepy/tests/test_cursors.py", line 14, in testidcursoritems
    self.assertEqual(len(items), 25)
AssertionError: 14 != 25

======================================================================
FAIL: testidcursorpages (tests.test_cursors.TweepyCursorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/.../tweepy/tests/test_cursors.py", line 18, in testidcursorpages
    self.assertEqual(len(pages), 5)
AssertionError: 1 != 5

Do you have any idea of what's going on? Can you please advise me?

Thank you,
Best regards.
Reply all
Reply to author
Forward
0 new messages