Python twitter api错误

Python twitter api错误,python,twitter,Python,Twitter,当我尝试输入用户名和密码时,出现以下错误: client = twitter.Api(username="hinakhan@yahoo.com", password="random") - 回溯(最近一次呼叫最后一次): 文件“”,第1行,在 client=twitter.Api(用户名=”hinakhan@yahoo.com“,password=“random”) TypeError:\uuuu init\uuuuuuuuu()获取了意外的关键字参数“username” 根据,twitter

当我尝试输入用户名和密码时,出现以下错误:

client = twitter.Api(username="hinakhan@yahoo.com", password="random")
-

回溯(最近一次呼叫最后一次):
文件“”,第1行,在
client=twitter.Api(用户名=”hinakhan@yahoo.com“,password=“random”)
TypeError:\uuuu init\uuuuuuuuu()获取了意外的关键字参数“username”

根据,twitter.Api类不接受
用户名
参数。您可能正在关注一些过时的信息。请记住,Twitter不再允许密码验证和验证。

您正在处理的旧文档现已过期。您需要阅读和查阅新文档并使用它。此错误也可能是由于库中的冲突而发生的,您需要检查您是否阅读了正确的文档或混淆了其他文档

检查API/Doc,错误消息似乎表明您不能使用
(用户名=
在您的调用中。我不熟悉API。可能是不同的关键字,如
userid
。?用户名和密码在API中不是有效的参数。请参阅此处的API类源:。参数应该是
consumer\u key
consumer\u secret
Traceback (most recent call last):
  File "<pyshell#44>", line 1, in <module>
    client = twitter.Api(username="hinakhan@yahoo.com", password="random")
TypeError: __init__() got an unexpected keyword argument 'username'