嗨,我剛剛開始評估python> Twitter api:s的不同選項。Twython:運行示例的錯誤
我已經寫了一些代碼看Twython包中的例子,但我總是得到相同的錯誤。
AttributeError: 'Twython' object has no attribute 'auth'
我也收到運行包含core_example文件相同的錯誤。
我從git運行「2.0.0」。
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python /Users/skjortan/dev/trunk/3rdPartyLibs/twython/core_examples/current_trends.py
Traceback (most recent call last):
File "/Users/skjortan/dev/trunk/3rdPartyLibs/twython/core_examples/current_trends.py", line 5, in <module>
trends = twitter.getCurrentTrends()
File "/Library/Python/2.7/site-packages/twython-2.0.0-py2.7.egg/twython/twython.py", line 167, in <lambda>
return lambda **kwargs: self._constructFunc(key, **kwargs)
File "/Library/Python/2.7/site-packages/twython-2.0.0-py2.7.egg/twython/twython.py", line 188, in _constructFunc
content = self._request(url, method=method, params=kwargs)
File "/Library/Python/2.7/site-packages/twython-2.0.0-py2.7.egg/twython/twython.py", line 205, in _request
response = func(url, data=myargs, auth=self.auth)
AttributeError: 'Twython' object has no attribute 'auth'
過程完成,退出代碼爲1
但基本搜索和獲取公共時間表不應該需要身份驗證。或者最近在twitter api中有過改變嗎? – Thom