我刚刚开始使用 twython,但在第一个示例中:
from twython import Twython
t = Twython()
t.search(q='python')
我收到了一个例外:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/twython-2.5.2-py2.7.egg/twython/twython.py", line 367, in search
return self.get('https://api.twitter.com/1.1/search/tweets.json', params=kwargs)
File "/usr/local/lib/python2.7/dist-packages/twython-2.5.2-py2.7.egg/twython/twython.py", line 238, in get
return self.request(endpoint, params=params, version=version)
File "/usr/local/lib/python2.7/dist-packages/twython-2.5.2-py2.7.egg/twython/twython.py", line 233, in request
content = self._request(url, method=method, params=params, files=files, api_call=url)
File "/usr/local/lib/python2.7/dist-packages/twython-2.5.2-py2.7.egg/twython/twython.py", line 210, in _request
retry_after=response.headers.get('retry-after'))
twython.twython.TwythonError: 'Bad Request: The request was invalid. An accompanying error message will explain why. This is the status code will be returned during rate limiting. -- An error occurred processing your request.'
有谁知道是什么导致了这个异常?
谢谢,
大号