enter code here
import queue
import time
import tweepy
import re
consumer_key = 'c65mUHOn31bv4bw7ZqyAvsZLv'
consumer_secret = 'umxOyBGSkTNSnZW308wnh4m2AVmIlXgxUteAJL06riPteXqz5X'
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
+代码
runnig我得到了这个错误Traceback (most recent call last):
File "luckyBot.py", line 31, in <module>
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
AttributeError: module 'tweepy' has no attribute 'OAuthHandler'
#
我也尝试过:
from tweepy.auth import OAuthHandler
auth = OAuthHandler(consumer_key, consumer_secret)
但这让我犯了这个错误:
Traceback (most recent call last):
File "luckyBot.py", line 7, in <module>
from tweepy.auth import OAuthHandler
ImportError: No module named 'tweepy.auth'