Traceback (most recent call last): File "C:\Users\14571\Desktop\111.py", line 16, in <module> writer.writerow([title,each_chats['value']],encoding='utf-8') TypeError: writer.writerow() takes no keyword arguments
时间: 2023-06-08 22:05:15 浏览: 176
浅谈Python traceback的优雅处理
这个错误是因为 writer.writerow() 不支持 encoding 关键字参数。正确的写法应该是:
writer.writerow([title, each_chats['value'].encode('utf-8')])
阅读全文