Open megies opened 8 years ago
Run into exactly that issue inside a docker image using Python 2.7.
File "/external/apps/py-env/lib/python2.7/site-packages/obspy/geodetics/flinnengdahl.py", line 41, in __init__
with open(self.names_file, 'r') as fh:
Adding the encoding argument in each open(..., encoding="utf-8")
calls of that file solved the issue for me.
This probably is obsolete on master
The following occurrences in the code base open files for reading in text mode without specifying an encoding. That means the data get decoded as ASCII which will fail if the input data can contain unicode characters (e.g. like in #1483).
It probably would be a good idea to go through these cases and either explicitly specify the encoding or open as binary and explicitly decode.