neogeo-mzs/dmf2mlm

UnicodeDecodeError

Opened this issue · 0 comments

Every time I try to convert a file I get an error:

File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/home/user/Dev/NEOGEO/dmf2mlm/main.py", line 116, in
mod = dmf.Module(file.read())
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/Dev/NEOGEO/dmf2mlm/src/dmf.py", line 563, in init
self.parse_samples()
File "/home/user/Dev/NEOGEO/dmf2mlm/src/dmf.py", line 669, in parse_samples
sample = Sample.from_dmf_data(self.data[self.head_ofs:])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/Dev/NEOGEO/dmf2mlm/src/dmf.py", line 410, in from_dmf_data
s.name = data[head_ofs+5:head_ofs+5+name_len].decode(encoding='ascii')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'ascii' codec can't decode byte 0xaa in position 3: ordinal not in range(128)