tweepy.error.TweepError: Not authorized.

1,643 views
Skip to first unread message

pratik...@gmail.com

unread,
Oct 23, 2013, 9:50:12 AM10/23/13
to twe...@googlegroups.com
I am getting a no authorization response from tweepy. 

consumer_key="-----------------"
consumer_secret="-----------------"
access_token="-----------------"
access_token_secret="-----------------"

auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)

api = tweepy.API(auth)

api.me() works
api.get_user("---") works
api.get_user("---") works
api.get_user("---") works
api.get_user("---") works
api.get_user("---") works
api.get_user("---") works
api.get_user("---") does not work

with the following error
  File "/usr/local/lib/python2.7/dist-packages/tweepy/binder.py", line 197, in _call
    return method.execute()
  File "/usr/local/lib/python2.7/dist-packages/tweepy/binder.py", line 173, in execute
    raise TweepError(error_msg, resp)
tweepy.error.TweepError: Not authorized.

Please help. Thanks

Yasin aktimur

unread,
Oct 23, 2013, 1:46:42 PM10/23/13
to twe...@googlegroups.com
Can expired access token, you need refresh tokens or delete account.

try:
    api.get_user("---")
except tweepy.TweepError:
    #delete or refresh access token and secret here....

23 Ekim 2013 Çarşamba 16:50:12 UTC+3 tarihinde pratik...@gmail.com yazdı:

Druce Vertes

unread,
Oct 23, 2013, 12:02:48 PM10/23/13
to twe...@googlegroups.com
would check if the user has marked their account private, is blocking you, has been banned, etc.


--
 
---
You received this message because you are subscribed to the Google Groups "tweepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tweepy+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Druce Vertes
StreetEYE, Inc.
@StreetEYE
646-543-7823 (54-DRUCE)
Reply all
Reply to author
Forward
0 new messages