ccampbell / mmlx

NES chiptune programming language
86 stars 4 forks source link

Error occurs during compile #1

Open pokedart9001 opened 7 years ago

pokedart9001 commented 7 years ago

After setting up mmlx using this command:

mmlx --watch ~/Desktop --create-mml 0 --create-nsf 1

I get this error upon saving the file:

generating file: /Users/noahlevitt/Desktop/Test.nsf
Sorry, an error occured:

OSError: [Errno 2] No such file or directory: 'define.inc'

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mmlxlib/listener.py", line 64, in process
    self.callback(file, output_file)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mmlxlib/musicbox.py", line 217, in processFile
    self.handleProcessedFile(song[0], new_output, open_file)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mmlxlib/musicbox.py", line 229, in handleProcessedFile
    self.createNSF(output, open_file)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mmlxlib/musicbox.py", line 183, in createNSF
    os.unlink('define.inc')

The .mml file appears in the destination directory, as well as a folder named nes_include, so there must be an issue compiling the generated .mml file.

I am running this on a Macbook Air using OS X El Capitan (10.11)

ccampbell commented 7 years ago

Thanks for the report! It’s been a long long time since I have looked at this project. It’s a strange issue and something to do with using absolute paths.

I am able to reproduce, but what you can do in the mean time is use a relative path to the Desktop or make the mmlx files that you want to convert available in a relative directory.

For example if you do

cd ~/Desktop
mmlx --watch . --create-mml 0 --create-nsf 1

It should work (you may have to also remove the nes_include directory if it wasn’t properly cleaned up.

ghost commented 4 years ago

I tried the command you mentioned, Campbell, but I got a similar error to @pokedart9001's:

generating file: ./PippityPop.nsf
Sorry, an error occured:

OSError: [Errno 8] Exec format error

Traceback (most recent call last):
  File "/home/pi/.local/lib/python2.7/site-packages/mmlxlib/listener.py", line 64, in process
    self.callback(file, output_file)
  File "/home/pi/.local/lib/python2.7/site-packages/mmlxlib/musicbox.py", line 217, in processFile
    self.handleProcessedFile(song[0], new_output, open_file)
  File "/home/pi/.local/lib/python2.7/site-packages/mmlxlib/musicbox.py", line 229, in handleProcessedFile
    self.createNSF(output, open_file)
  File "/home/pi/.local/lib/python2.7/site-packages/mmlxlib/musicbox.py", line 170, in createNSF
    output = subprocess.Popen([command, '-m1', '-i', path], stdout = subprocess.PIPE, stderr = subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception

I even got the .mml file and the nes_include directory as well. I would save my WIP 0CC-FamiTracker files on my USB flash drive, and now I store them on my rechargable battery-powered Raspberry Pi computer/fileserver. I want to try to make chiptunes on Raspberry Pi as well, but that's just the case.

I'm running on a Raspberry Pi using Raspbian Buster, and Python 2.7. I wish there would be a Python 3 port, though...

Edit: And yes, I wanted to make my Pi into a portable one, with a touchscreen display and cooling fan. Wish me luck~!