FXIhub / condor

Condor: a simulation tool for flash X-ray imaging
http://lmb.icm.uu.se/condor
BSD 2-Clause "Simplified" License
25 stars 14 forks source link

Codec error when trying to create conda package #18

Closed FilipeMaia closed 6 years ago

FilipeMaia commented 6 years ago

When trying to create a conda package I get the following error:

Traceback (most recent call last):
  File "pickle_tables.py", line 107, in <module>
    pickle_atomic_standard_weights_and_numbers(here + "/sw", here)
  File "pickle_tables.py", line 63, in pickle_atomic_standard_weights_and_numbers
    lines = f.readlines()
  File "/Users/filipe/miniconda3/conda-bld/condor_1527942418754/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 156: ordinal not in range(128)

I think using codes.open() instead of simply open() before the readlines() will probably fix it.