Python ';评论助手';这是不可容忍的

Python ';评论助手';这是不可容忍的,python,reddit,praw,Python,Reddit,Praw,我试图学习如何在Python中创建Reddit机器人,但收到以下错误消息 C:\Users\Warbz\Desktop>python redditbot.py Logging in... Grabbing subreddit... Grabbing comments... Traceback (most recent call last): File "redditbot.py", line 30, in <module> run_bot() File "red

我试图学习如何在Python中创建Reddit机器人,但收到以下错误消息

C:\Users\Warbz\Desktop>python redditbot.py
Logging in...
Grabbing subreddit...
Grabbing comments...
Traceback (most recent call last):
  File "redditbot.py", line 30, in <module>
    run_bot()
  File "redditbot.py", line 19, in run_bot
    for comment in subredditComments:
TypeError: 'CommentHelper' object is not iterable

我试过查看PRAW api,但我不确定到底出了什么问题,请提供帮助?

comments
提供了CommentHelper的实例,需要使用括号对其进行实例化以调用它

for comment in r.subreddit('test').comments(limit=25):
    print(comment.author)

添加代码后,我仍然会遇到此错误,注释太长,所以我只包含了结尾部分,希望这是足够的信息。。。文件“C:\Users\Warbz\AppData\Local\Programs\Python36\lib\site packages\prawcore\auth.py”,第328行,刷新密码=self.\u password)文件“C:\Users\Warbz\AppData\Local\Programs\Python36\lib\site packages\prawcore\auth.py”,第142行,在请求令牌有效载荷中获取('error\u description')))prawcore.exceptions.OAutheException:无效的\u授权错误处理请求请读取实际错误。这与最初的帖子不同。OAuth可能与您提供的密码/密钥有问题好的,所以我刚刚发现只有您用来创建OAuth凭据的reddit帐户才能使用客户端sercret和ID,谢谢!
for comment in r.subreddit('test').comments(limit=25):
    print(comment.author)