cneud / alto-tools

Python tools for performing various operations on ALTO XML files
Apache License 2.0
39 stars 15 forks source link

Fail gracefully on Python 2 #6

Closed mikegerber closed 5 years ago

mikegerber commented 5 years ago

On Python 2, the script fails with an obscure error message because open() does not have an encoding parameter yet. Fail more gracefully by giving a meaningful error message early on Python 2.

cneud commented 5 years ago

Thanks. Hope we can soon finally say bye bye, Python 2.