考虑以下代码:
import twitter
api = twitter.Api()
most_recent_status = api.GetUserTimeline('nemesisdesign')[0].text
在我的服务器(nemesisdesign.net)上几天前停止工作。
如果我在自己的机器上尝试相同的代码,它就可以正常工作。
这是堆栈跟踪:
>>> most_recent_status = api.GetUserTimeline('nemesisdesign')[0].text
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "build/bdist.linux-i686/egg/twitter.py", line 1414, in GetUserTimeline
json = self._FetchUrl(url, parameters=parameters)
File "build/bdist.linux-i686/egg/twitter.py", line 2032, in _FetchUrl
url_data = opener.open(url, encoded_post_data).read()
File "/usr/local/lib/python2.6/urllib2.py", line 397, in open
response = meth(req, response)
File "/usr/local/lib/python2.6/urllib2.py", line 510, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/lib/python2.6/urllib2.py", line 435, in error
return self._call_chain(*args)
File "/usr/local/lib/python2.6/urllib2.py", line 369, in _call_chain
result = func(*args)
File "/usr/local/lib/python2.6/urllib2.py", line 518, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found
有什么提示吗?我没有线索 ... :-(