终端中的 Twitter Python API - 安装错误
我已经安装了以下库并完成了 twitter python 设置中的所有步骤:
httplib2-0.7.1 simplegeo-python-oauth2-1fcc1a6 python-twitter-0.8.2 simplejson-2.1.6
我正在使用此处的设置说明:http://code.google.com/p/python-twitter/
当我运行 python setup.py 测试时,出现 17 个错误。这是输出的片段(抱歉,它很多):
testNewFromJsonDict (twitter_test.UserTest)
Test the twitter.User NewFromJsonDict method ... ok
testProperties (twitter_test.UserTest)
Test all of the twitter.User properties ... ok
testCreateFriendship (twitter_test.ApiTest)
Test the twitter.Api CreateFriendship method ... ERROR
testDestroyDirectMessage (twitter_test.ApiTest)
Test the twitter.Api DestroyDirectMessage method ... ERROR
testDestroyFriendship (twitter_test.ApiTest)
Test the twitter.Api DestroyFriendship method ... ERROR
testDestroyStatus (twitter_test.ApiTest)
Test the twitter.Api DestroyStatus method ... ERROR
testGetDirectMessages (twitter_test.ApiTest)
Test the twitter.Api GetDirectMessages method ... ERROR
testGetFeatured (twitter_test.ApiTest)
Test the twitter.Api GetFeatured method ... ERROR
testGetFollowers (twitter_test.ApiTest)
Test the twitter.Api GetFollowers method ... ERROR
testGetFriends (twitter_test.ApiTest)
Test the twitter.Api GetFriends method ... ERROR
testGetFriendsTimeline (twitter_test.ApiTest)
Test the twitter.Api GetFriendsTimeline method ... ERROR
testGetPublicTimeline (twitter_test.ApiTest)
Test the twitter.Api GetPublicTimeline method ... ERROR
testGetReplies (twitter_test.ApiTest)
Test the twitter.Api GetReplies method ... ERROR
testGetStatus (twitter_test.ApiTest)
Test the twitter.Api GetStatus method ... ERROR
testGetUser (twitter_test.ApiTest)
Test the twitter.Api GetUser method ... ERROR
testGetUserTimeline (twitter_test.ApiTest)
Test the twitter.Api GetUserTimeline method ... ERROR
testPostDirectMessage (twitter_test.ApiTest)
Test the twitter.Api PostDirectMessage method ... ERROR
testPostUpdate (twitter_test.ApiTest)
Test the twitter.Api PostUpdate method ... ERROR
testTwitterError (twitter_test.ApiTest)
Test that twitter responses containing an error message are wrapped. ... ERROR
I've installed the following libraries and gotten through all the steps in the twitter python setup:
httplib2-0.7.1 simplegeo-python-oauth2-1fcc1a6 python-twitter-0.8.2 simplejson-2.1.6
I'm using the setup instructions here: http://code.google.com/p/python-twitter/
When I run python setup.py test, I get 17 errors. Here is a snippet of the output (sorry it's a lot):
testNewFromJsonDict (twitter_test.UserTest)
Test the twitter.User NewFromJsonDict method ... ok
testProperties (twitter_test.UserTest)
Test all of the twitter.User properties ... ok
testCreateFriendship (twitter_test.ApiTest)
Test the twitter.Api CreateFriendship method ... ERROR
testDestroyDirectMessage (twitter_test.ApiTest)
Test the twitter.Api DestroyDirectMessage method ... ERROR
testDestroyFriendship (twitter_test.ApiTest)
Test the twitter.Api DestroyFriendship method ... ERROR
testDestroyStatus (twitter_test.ApiTest)
Test the twitter.Api DestroyStatus method ... ERROR
testGetDirectMessages (twitter_test.ApiTest)
Test the twitter.Api GetDirectMessages method ... ERROR
testGetFeatured (twitter_test.ApiTest)
Test the twitter.Api GetFeatured method ... ERROR
testGetFollowers (twitter_test.ApiTest)
Test the twitter.Api GetFollowers method ... ERROR
testGetFriends (twitter_test.ApiTest)
Test the twitter.Api GetFriends method ... ERROR
testGetFriendsTimeline (twitter_test.ApiTest)
Test the twitter.Api GetFriendsTimeline method ... ERROR
testGetPublicTimeline (twitter_test.ApiTest)
Test the twitter.Api GetPublicTimeline method ... ERROR
testGetReplies (twitter_test.ApiTest)
Test the twitter.Api GetReplies method ... ERROR
testGetStatus (twitter_test.ApiTest)
Test the twitter.Api GetStatus method ... ERROR
testGetUser (twitter_test.ApiTest)
Test the twitter.Api GetUser method ... ERROR
testGetUserTimeline (twitter_test.ApiTest)
Test the twitter.Api GetUserTimeline method ... ERROR
testPostDirectMessage (twitter_test.ApiTest)
Test the twitter.Api PostDirectMessage method ... ERROR
testPostUpdate (twitter_test.ApiTest)
Test the twitter.Api PostUpdate method ... ERROR
testTwitterError (twitter_test.ApiTest)
Test that twitter responses containing an error message are wrapped. ... ERROR
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您省略的错误消息包含用于故障排除的重要信息。让我猜一下 - 你从项目的下载部分下载了 tar.gz 文件,但由于某种原因没有将测试数据打包进去。所以失败的原因一定是找不到所需的测试数据。您可以在其存储库中看到: http://code.google .com/p/python-twitter/source/browse/#hg%2Ftestdata
如果这是真的,请不要惊慌。只需继续与 Twitter API 进行现实世界的交互即可。
I think the error messages that you omitted contains important information for troubleshooting. Let me guess - you downloaded the tar.gz file from the Downloads section of the project but it for some reason didn't package the test data in. So the reason of failure must be that it couldn't find the required testing data. You can see in its repository: http://code.google.com/p/python-twitter/source/browse/#hg%2Ftestdata
If this is true, don't panic. Just go on with your real world interaction with twitter API.