ptwobrussell/Mining-the-Social-Web — Issue #13: twitter__util.py does not work on example 4-3 (friends_followers__get_friends_refactored.py)
Author: onozka
Created: 2012-01-05 13:35:24+00:00
State: open

Hi.
twitter__util.py does not work on example 4-3.
I'm using latest version of twitter__util.py on GitHub.

I wrote blow is error message. It occurs 404 error.

Traceback (most recent call last):
File "friends_followers__get_friends_refactored.py", line 37, in
ids = getFriendIds(sys.argv[1], friends_limit=10000)
IndexError: list index out of range
Onozuka-Ryo-no-MacBook-Air:~ pamsuke$ python friends_followers__get_friends_refactored.py
Traceback (most recent call last):
File "friends_followers__get_friends_refactored.py", line 37, in
ids = getFriendIds(sys.argv[0], friends_limit=10000)
File "friends_followers__get_friends_refactored.py", line 26, in getFriendIds
response = makeTwitterRequest(t, t.friends.ids, **params)
File "/Users/pamsuke/twitter__util.py", line 21, in makeTwitterRequest
wait_period = handleTwitterHTTPError(e, t, wait_period)
File "/Users/pamsuke/twitter__util.py", line 61, in handleTwitterHTTPError
raise e
twitter.api.TwitterHTTPError: Twitter sent status 404 for URL: 1/friends/ids.json using parameters: (cursor=-1&oauth_consumer_key=xxxxxxxx&oauth_nonce=xxxxxxxxx&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1325677562&oauth_token=xxxxxxx&oauth_version=1.0&screen_name=friends_followers__get_friends_refactored.py&oauth_signature=xxxxxxxxxxxx)
details: {"error":"Not found","request":"\/1\/friends\/ids.json?cursor=-1&oauth_consumer_key=xxxxxxxxx&oauth_nonce=xxxxxxxxxx&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1325677562&oauth_token=xxxxxxxxxx&oauth_version=1.0&screen_name=friends_followers__get_friends_refactored.py&oauth_signature=xxxxxxxxxx"}

Same error occurs in any other examples which imports twitter__util.py.

How to fix twitter__util.py? X(