我正在用 python 编写一个聊天机器人程序,当我运行我的代码时,出现以下错误。
Traceback (most recent call last):
File "C:/Users/stephen/AppData/Local/Programs/Python/Python35/chatbot.py", line 97, in <module>
with bz2.open("C:/RC_{}".format(timeframe.split('-')[0],timeframe), buffering=1000) as f:
TypeError: open() got an unexpected keyword argument 'buffering'
在网上找不到任何有关错误的信息。我所看到的可能是它是一个错误,我应该将它报告给 python。当前运行python3.5.3。这是获取错误的代码部分。
with bz2.open("C:/RC_{}".format(timeframe.split('-')[0],timeframe), buffering=1000) as f:
for row in f:
row_counter += 1
parent_id = row['parent_id']
body = format_data(row['body'])
created_utc = row['created_utc']
score = row['score']
comment_id = row['name']
subreddit = row['subreddit']
parent_data = find_parent(parent_id)