Python 为什么对象被称为";模块";不能打电话?
我正在尝试制作一个机器人来回复Reddit上的评论,但我一直遇到这个错误,我不知道该怎么办 这是我得到的错误:Python 为什么对象被称为";模块";不能打电话?,python,python-3.x,praw,Python,Python 3.x,Praw,我正在尝试制作一个机器人来回复Reddit上的评论,但我一直遇到这个错误,我不知道该怎么办 这是我得到的错误: Traceback (most recent call last): File "F:\Python\Reddit Bot\bot.py", line 3, in <module> r = praw.reddit(user_agent = "Replyer Bot") TypeError: 'module' object is not callable 回溯(
Traceback (most recent call last):
File "F:\Python\Reddit Bot\bot.py", line 3, in <module>
r = praw.reddit(user_agent = "Replyer Bot")
TypeError: 'module' object is not callable
回溯(最近一次呼叫最后一次):
文件“F:\Python\Reddit Bot\Bot.py”,第3行,在
r=praw.reddit(user\u agent=“Replyer Bot”)
TypeError:“模块”对象不可调用
我已经导入了用冒号分隔的praw、time和random,如果有帮助的话您在
r=praw.reddit(user\u agent=“Replyer Bot”)
中有输入错误。使用:
r = praw.Reddit(user_agent = "Replyer Bot")
查看有代码行吗?将有助于分析。谢谢