BenW94 / python-twitter

Automatically exported from code.google.com/p/python-twitter
Apache License 2.0
0 stars 0 forks source link

python-twitter throws KeyError #241

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. let the twitter module run for a long time
2.
3.

What is the expected output? What do you see instead?
Nothing

What version of the product are you using? On what operating system?
Newest on debian

Please provide any additional information below.
2012-10-05 13:39:47,517 [ERROR   ] 'results'
Traceback (most recent call last):
  File "/harryplotter/harryplotter.py", line 81, in <module>
    tweets = get_tweets_by_terms(terms, last_id, tweets_per_page = config.getint("twitter", "tweets_per_page"), recursive = True)
  File "/harryplotter/harrytools.py", line 9, in get_tweets_by_terms
    tweets = get_tweets_by_term(term, last_id, refresh_time, tweets_per_page, recursive)
  File "/harryplotter/harrytools.py", line 24, in get_tweets_by_term
    tweets = twitter.Api().GetSearch(term=term, since_id=last_id, per_page=tweets_per_page, lang=None)
  File "/usr/local/lib/python2.6/dist-packages/python_twitter-0.8.2-py2.6.egg/twitter.py", line 2401, in GetSearch
    for x in data['results']:
KeyError: 'results'

As my last report, please document this exception if this is expected behaviour 
or wrap it into your own error class.

Original issue reported on code.google.com by pinin...@googlemail.com on 5 Oct 2012 at 11:49