Open GoogleCodeExporter opened 8 years ago
when i try this . a error raise
'Api' object has no attribute 'statuses_count
statuses_count is not defined in twitter.py
how to fix this?
Original comment by tinyD...@gmail.com
on 18 Apr 2010 at 2:37
Try the new patch, it should work.
Original comment by amik...@gmail.com
on 19 Apr 2010 at 2:47
Attachments:
then . I try ur newer edition ,some other problems raise.
when i try to get all my twitter statuses use the codes below
### code ########
import twitter_all
api = twitter_all.Api(username='tinydata',password='***')
statuses = api.GetUserTimeline('tinydata',all=True)
print len(statuses)
### /code #########
some errors raise
#######trace report #########
Traceback (most recent call last):
File "testApi.py", line 3, in <module>
statuses = api.GetUserTimeline('tinydata',all=True,count=400)
File "/home/himmih/python-twitter/twitter_all.py", line 1550, in GetUserTimeline
page=i+1))
File "/home/himmih/python-twitter/twitter_all.py", line 1600, in GetUserTimeline
json = self._FetchUrl(url, parameters=parameters)
File "/home/himmih/python-twitter/twitter_all.py", line 2275, in _FetchUrl
url_data = opener.open(url, encoded_post_data).read()
File "/usr/lib/python2.6/urllib2.py", line 389, in open
response = meth(req, response)
File "/usr/lib/python2.6/urllib2.py", line 502, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.6/urllib2.py", line 427, in error
return self._call_chain(*args)
File "/usr/lib/python2.6/urllib2.py", line 361, in _call_chain
result = func(*args)
File "/usr/lib/python2.6/urllib2.py", line 510, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 502: Bad Gateway
#######################
I'm not sure if twitter's limiting number of requestes per hours cause this
problem
or I use proxychains to reach twitter since I'm in China unfortunately.
any ideas will appreciated
Original comment by tinyD...@gmail.com
on 19 Apr 2010 at 5:40
Yes, this is Twitter limiting the number of statuses per request. I am sorry, I
can't
do anything about it, obviously. Try that code on an account with few statuses
and
you 'll see it works. I have submitted a bug report to Twitter API about this,
and
all we can do is wait for it to be fixed by them.
Original comment by amik...@gmail.com
on 19 Apr 2010 at 3:15
Original issue reported on code.google.com by
amik...@gmail.com
on 8 Feb 2010 at 4:41