Traceback (most recent call last):
File "run.py", line 56, in <module>
run(r, comments_replied_to)
File "run.py", line 30, in run_bot
b.write("Author=" + comment.submission.author + "\n")
TypeError: cannot concatenate 'str' and 'Redditor' objects
这是从代码中接收到的回溯信息,我不确定该如何解决,谢谢。
以下是代码:
with open ("first.txt", "a") as f, open
("second.txt", "a") as b:
f.write(comment.id + "\n")
b.write("author=" + comment.submission.author + "\n")