twitter - Error importing Tweepy with Python -
i've installed tweepy , have no problem "import tweepy" being in code. when try use in tweepy, however, i'm faced following error: "importerror: cannot import name 'oauthhandler'"
tweepy import oauthhandler consumer_token = 'xxx' consumer_secret = 'yyy' auth = tweepy.oauthhandler(consumer_token, consumer_secret)
all solutions on stackoverflow try this, still not work me
tweepy.auth import oauthhandler consumer_token = 'xxx' consumer_secret = 'yyy' auth = tweepy.oauthhandler(consumer_token, consumer_secret)
i bet file named tweepy.py
or there's file/package nearby same name python tries import oauthhandler
wrong location.
try rename file, can change code to:
import tweepy print(tweeps)
to check path , insure it's correct.
Comments
Post a Comment