简体   繁体   English

HTTP错误401:未经授权

[英]HTTP Error 401: Unauthorized

Again stucked with tweepy. 再次卡住tweepy。

I got an app that uses tweepy oauth authentication and follows step by step the instructions from the tutorial: 我有一个使用tweepy oauth身份验证的应用程序,并按照教程中的说明逐步进行操作:

http://joshthecoder.github.com/tweepy/docs/auth_tutorial.html#oauth-authentication http://joshthecoder.github.com/tweepy/docs/auth_tutorial.html#oauth-authentication

This app was working correctly, but now, is only returning the same exception in any user attempt to authenticate, even with new accounts. 这个应用程式可以正常运作,但是现在,即使是使用新帐户,在任何用户进行身份验证的尝试中都只会返回相同的异常。

I have spent a few hours on this and I can't get a solution. 我已经花了几个小时来解决这个问题。

Any idea? 任何想法?

HTTP Error 401: Unauthorized
Request Method: GET 
Request URL: http://(hidden)/?oauth_token=FSL76eId7n64I1ACX1EKBHIV504xlZmQjJg8iO3Bc&oauth_verifier=KVjaxpzFn40JCXvk4r5cDNVbdILaiuF5szv6yBcpQo 
Django Version: 1.2.1 
Exception Type: TweepError 
Exception Value: HTTP Error 401: Unauthorized

Exception Location: /(hidden)/tweepy/auth.py in get_access_token, line 126 
Python Executable: /usr/local/bin/python 
Python Version: 2.6.5 

One guess may be the accounts are blocked try using cURL to figure out if you are blacklisted, in which case Twitter probably won't have notified you of this. 一个猜测可能是帐户被阻止,尝试使用cURL来确定您是否被列入黑名单,在这种情况下,Twitter可能不会将其通知您。 Alternatively, try another module: http://dev.twitter.com/pages/oauth_libraries 或者,尝试其他模块: http : //dev.twitter.com/pages/oauth_libraries

for cURL do the following: 对于cURL,请执行以下操作:

curl  -i -u  my_account:fuuu! http://api.twitter.com/1/account/rate_limit_status.json -v 

Where my_account is your Twitter account. 其中my_account是您的Twitter帐户。 Hope that helps. 希望能有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM