Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing error of DMFs saved with latest version of Deflemask #5

Open
sreuter opened this issue Jul 4, 2024 · 1 comment
Open

Parsing error of DMFs saved with latest version of Deflemask #5

sreuter opened this issue Jul 4, 2024 · 1 comment

Comments

@sreuter
Copy link

sreuter commented Jul 4, 2024

Hey there :)

We recently started doing some final adjustments on our BGM. Unfortunately, the DMFs produced by the latest version of Deflemask can't be parsed by dmf2mlm.

Parsing 'input/xxxx.dmf'... Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/mtn/Library/CloudStorage/Dropbox/dmf2mlm/__main__.py", line 116, in <module>
    mod = dmf.Module(file.read())
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mtn/Library/CloudStorage/Dropbox/dmf2mlm/src/dmf.py", line 563, in __init__
    self.parse_samples()
  File "/Users/mtn/Library/CloudStorage/Dropbox/dmf2mlm/src/dmf.py", line 669, in parse_samples
    sample = Sample.from_dmf_data(self.data[self.head_ofs:])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mtn/Library/CloudStorage/Dropbox/dmf2mlm/src/dmf.py", line 415, in from_dmf_data
    s.bits = SampleWidth(data[head_ofs+2])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/enum.py", line 744, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/enum.py", line 1158, in __new__
    raise ve_exc
ValueError: 178 is not a valid SampleWidth

==

Parsing 'input/xxxx.dmf'... Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/mtn/Library/CloudStorage/Dropbox/dmf2mlm/__main__.py", line 116, in <module>
    mod = dmf.Module(file.read())
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mtn/Library/CloudStorage/Dropbox/dmf2mlm/src/dmf.py", line 563, in __init__
    self.parse_samples()
  File "/Users/mtn/Library/CloudStorage/Dropbox/dmf2mlm/src/dmf.py", line 669, in parse_samples
    sample = Sample.from_dmf_data(self.data[self.head_ofs:])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mtn/Library/CloudStorage/Dropbox/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 0xff in position 0: ordinal not in range(128)

Any idea what might be going wrong here?

@sreuter sreuter changed the title DMF saved with latest version of Deflemask cause parsing error Parsing error of DMFs saved with latest version of Deflemask Jul 4, 2024
@sreuter
Copy link
Author

sreuter commented Aug 16, 2024

@neogeo-mzs Any chance you could have a look at this? :) Apologies btw, I should have opened that in the dmf2mlm repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant