Closed htyeim closed 5 years ago
@htyeim I had this issue compiling:
python remove_decode_errors.py
Traceback (most recent call last):
File "remove_decode_errors.py", line 8, in <module>
content = open(f,'r',errors='replace').read()
TypeError: 'errors' is an invalid keyword argument for this function
make[2]: *** [remove_decode_errors] Error 1
make[1]: *** [source] Error 2
make: *** [source] Error 2
@htyeim, Thank you so much. This solved my problem on python3. It's odd that some systems show this unicode error but some don't.
The reason @timduly4 couldn't compile this is perhaps because "open()" changed in python3 to allow the "errors" keyword argument. This means that, while this solution works for python3, it doesn't for python2, and thus can't be a solution for pyglow.
Is there a way to make this solution compatible with python2?
Building off this: https://github.com/timduly4/pyglow/pull/80
@htyeim Thanks for your help-- I've implemented your changes in https://github.com/timduly4/pyglow/pull/80
remove possible unicode errors in fortran code