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

Unable to load ROMs with ale.loadROM() #89

Open
Gregliest opened this issue Sep 1, 2021 · 3 comments
Open

Unable to load ROMs with ale.loadROM() #89

Gregliest opened this issue Sep 1, 2021 · 3 comments

Comments

@Gregliest
Copy link

Gregliest commented Sep 1, 2021

I followed the directions in the readme for downloading, unrarring/unzipping, and loading the rom files. I can see them in .local/lib/python3.8/site-packages/atari_py/atari_roms.

However, ale.loadROM() is unable to find the ROM file:

>>> import atari_py
>>> ale = atari_py.ALEInterface()
>>> ale.loadROM("pong.bin")
ROM file pong.bin not found.

My C++ is a bit rusty, but looks like this might be wanting a full path? https://github.com/openai/atari-py/blob/master/atari_py/ale_interface/src/ale_interface.cpp#L124

I wasn't able to get the solution for the gym to work for just the base library.

@Gregliest
Copy link
Author

Figure this out. The roms have to be in a folder called roms, not atari_roms. Seems like a bug with the import script.

@Gregliest
Copy link
Author

https://github.com/openai/atari-py/blob/master/atari_py/games.py#L8 should be roms instead of atari_roms for this case, but not sure where else this is used. (Also the exception should change with it, https://github.com/openai/atari-py/blob/master/atari_py/games.py#L10)

@hdeavila1992
Copy link

I can't get ale.loadROM("Breakout") to work. When executing, I receive the following error:

raise AttributeError(f"No ROM named {name}. Supported ROMs: {', '.join(roms)}")
AttributeError: No ROM named get_rom_path. Supported ROMs: Adventure, AirRaid, Alien, Amidar, Assault, Asterix, Asteroids, Atlantis2, Atlantis, Backgammon

Strangely, the code works fine in Google Colab but not in my local environment. Could anyone help me identify the issue?"

The code:

from ale_py import ALEInterface, roms
import gymnasium as gym
import shimmy
import pygame

#print(gym.envs.registration.registry.keys())

ale = ALEInterface()
ale.loadROM(roms.get_rom_path("Adventure"))

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