klimzaporojets/DWIE

UnicodeEncodeError when do

Closed this issue · 1 comments

edzq commented

When I ran the
python src/dwie_download.py

Error happened:

UnicodeEncodeError: 'ascii' codec can't encode character '\u2013'....

Acording to the stackoverflow, we should add encoding='utf-8' when open file to dump the json.
Change the line 171 of dwie_download.py to:
json.dump(annos_json, open(annos_with_content_art_path, 'wt', encoding='utf-8'), indent=4, ensure_ascii=False)

Nice project for document-level IE. Hope this can help others.

Dear Qi Zhang,

Thanks for your interest in our work! In case you still have the problem downloading the dataset, you can access it here: https://cloud.ilabt.imec.be/index.php/s/7qAoxSr8Jx58Ecc (annos_with_content) directory.

Best,

Klim