stable-retro icon indicating copy to clipboard operation
stable-retro copied to clipboard

retro/cores/*.json missing after installation

Open schmidtdominik opened this issue 3 years ago • 5 comments

Issue summary

After installing stable-retro in a fresh conda environment with:

pip install git+https://github.com/MatPoliquin/stable-retro.git

the 7 .json files from retro/cores are missing for some reason and importing any roms leads to an exception:

File "/[...]/lib/python3.8/site-packages/retro/data/__init__.py", line 401, in get_known_hashes
    known_hashes[sha] = (game, ext, os.path.join(path(), curpath))
UnboundLocalError: local variable 'ext' referenced before assignment

Copying the files over from a regular gym-retro installation solves the issue.

System information

  • Pop!_OS 21.04
  • Python 3.8.12
  • stable-retro commit 4d3b08e

schmidtdominik avatar Oct 22 '21 10:10 schmidtdominik

For some reason the files in ./cores are not copied to retro/cores, and the library relies on those files to run properly.

You can fix it by cloning the repository, copying the files from ./cores to retro/cores and installing the package from source.

If you need to install it without cloning the repo, you can install it from my fork running: pip install git+https://github.com/FragileTech/stable-retro.git

@MatPoliquin I am not sure why the retro/cores folder is empty. In my fork I just copied the files and it does work, but probably that is not the "right" way to fix it. If you want I can open a PR with the changes.

Guillemdb avatar Dec 13 '21 11:12 Guillemdb

@Guillemdb Yep thank you very much I will gladly accept your PR. Currently I have a very heavy workload and don't have time to check it out until next month at least , so in the meantime I will integrate your PR

MatPoliquin avatar Dec 13 '21 12:12 MatPoliquin

@MatPoliquin Thanks, I'm happy to help :)

Guillemdb avatar Dec 13 '21 12:12 Guillemdb

@schmidtdominik stable-retro has moved to Farama fondation: https://github.com/Farama-Foundation/stable-retro

Can you recreate your issue there so that it's under your user name? I will continue to follow over there

MatPoliquin avatar May 17 '23 12:05 MatPoliquin

@schmidtdominik @Guillemdb The problem is fixed now in the new repo: https://github.com/Farama-Foundation/stable-retro

MatPoliquin avatar Jun 26 '23 13:06 MatPoliquin