Python Tweepy API游标对象没有属性“\uuuuu self\uuuuu”
我已经直接从Git安装了tweepy 2.3,并且刚刚开始学习如何使用它,但是当我尝试从用户定义的twitter id获取推文时,我遇到了一个错误。下面是我的代码:Python Tweepy API游标对象没有属性“\uuuuu self\uuuuu”,python,tweepy,Python,Tweepy,我已经直接从Git安装了tweepy 2.3,并且刚刚开始学习如何使用它,但是当我尝试从用户定义的twitter id获取推文时,我遇到了一个错误。下面是我的代码: import tweepy from tweepy.cursor import Cursor #Necessary information consumer_key = "a" consumer_secret = "b" access_token = "c" access_token_secret = "d" #setup a
import tweepy
from tweepy.cursor import Cursor
#Necessary information
consumer_key = "a"
consumer_secret = "b"
access_token = "c"
access_token_secret = "d"
#setup
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
result = Cursor(api.user_timeline, id="BarackObama").items(50)
for status in result:
print(status.text)
我得到这个错误:
Traceback (most recent call last):
File "/Applications/Wing101.app/Contents/Resources/src/debug/tserver/_sandbox.py", line 21, in <module>
File "/Library/Python/2.7/site-packages/tweepy-2.3-py2.7.egg/tweepy/cursor.py", line 190, in next
File "/Library/Python/2.7/site-packages/tweepy-2.3-py2.7.egg/tweepy/cursor.py", line 105, in next
AttributeError: 'function' object has no attribute '__self__'
我找到了修复错误的GitHub repo