阅读理解执行段落抽取报错
Created by: xiegegege
python3.6下阅读理解执行段落抽取时报错,报错如下: Start paragraph extraction, this may take a few hours Source dir: ../data/preprocessed Target dir: ../data/extracted Processing trainset Traceback (most recent call last): File "paragraph_extraction.py", line 198, in print(json.dumps(sample, encoding='utf8', ensure_ascii=False)) File "/opt/_internal/cpython-3.6.0/lib/python3.6/json/init.py", line 238, in dumps **kw).encode(obj) TypeError: init() got an unexpected keyword argument 'encoding' Traceback (most recent call last): File "paragraph_extraction.py", line 198, in print(json.dumps(sample, encoding='utf8', ensure_ascii=False)) File "/opt/_internal/cpython-3.6.0/lib/python3.6/json/init.py", line 238, in dumps **kw).encode(obj) TypeError: init() got an unexpected keyword argument 'encoding' Processing devset Traceback (most recent call last): File "paragraph_extraction.py", line 198, in print(json.dumps(sample, encoding='utf8', ensure_ascii=False)) File "/opt/_internal/cpython-3.6.0/lib/python3.6/json/init.py", line 238, in dumps **kw).encode(obj)