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

Error No output expected from command 'mem = manager:machine().devices[":maincpu"].spaces["program"]' #27

Open
consciousgaze opened this issue Jun 8, 2020 · 1 comment

Comments

@consciousgaze
Copy link

I tried to see my game id by running
e = Emulator("test_env", roms_path, "", {}, binary_path="/usr/local/lib/python3.6/dist-packages/MAMEToolkit/emulator/mame/mamearcade64")

But I got error of

No output expected from command 'mem = manager:machine().devices[":maincpu"].spaces["program"]', but recieved: error: 	[string "..."]:2: attempt to index a nil value (field ':maincpu')
Traceback (most recent call last):
  File "test.py", line 15, in <module>
    test_mame()
  File "test.py", line 7, in test_mame
    e = Emulator("test_env", roms_path, "", {}, binary_path="/usr/local/lib/python3.6/dist-packages/MAMEToolkit/emulator/mame/mamearcade64")
  File "/usr/local/lib/python3.6/dist-packages/MAMEToolkit/emulator/Emulator.py", line 56, in __init__
    self.create_lua_variables()
  File "/usr/local/lib/python3.6/dist-packages/MAMEToolkit/emulator/Emulator.py", line 91, in create_lua_variables
    self.console.writeln('mem = manager:machine().devices[":maincpu"].spaces["program"]')
  File "/usr/local/lib/python3.6/dist-packages/MAMEToolkit/emulator/Console.py", line 94, in writeln
    raise IOError(error)
OSError: No output expected from command 'mem = manager:machine().devices[":maincpu"].spaces["program"]', but recieved: error: 	[string "..."]:2: attempt to index a nil value (field ':maincpu')

Did I set up things right? or this is a MAME issue?

NOTE:
By running pip3 install MAMEToolkit, MAME isn't installed and the .mame isn't found. So I built mame my self with

cd /usr/local/lib/python3.6/dist-packages/MAMEToolkit/emulator && \                             
git clone https://github.com/M-J-Murray/mame.git && cd mame && \                                
make SUBTARGET=arcade -j4
@rwa
Copy link

rwa commented May 16, 2021

I also encountered this error but it does not appear to be fatal. Note that you won't see the id in brackets until you start the game - I got stuck wondering where the game id's were for quite awhile before realizing that.

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

2 participants