jbaiter / zotero-cli

Command-line interface for Zotero
MIT License
274 stars 41 forks source link

Explicitly open files with UTF-8 encoding #36

Closed kprussing closed 7 years ago

kprussing commented 7 years ago

In Python 3, the file objects explicitly expect str objects not bytes. This means encoding the string causes an error. The work around is to use the Python io module which backports the Python 3 open builtin and allows using the 'encoding' keyword.

This is only relevant when saving a note when an exception is raised.

jbaiter commented 7 years ago

Thank you!