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

Not working with gymnasium 1.0.0 #3

Open
guiambros opened this issue Oct 25, 2024 · 1 comment
Open

Not working with gymnasium 1.0.0 #3

guiambros opened this issue Oct 25, 2024 · 1 comment

Comments

@guiambros
Copy link

It seems gymnasium latest version introduced some breaking changes. The same code runs well without any modifications on gymnasium 0.29.0, but breaks on gymnasium 1.0.0:

Traceback (most recent call last):
  File ".../test-simplegrid.py", line 10, in <module>
    obs, info = env.reset()
  File ".../lib/python3.10/site-packages/gymnasium/wrappers/common.py", line 146, in reset
    return super().reset(seed=seed, options=options)
  File ".../lib/python3.10/site-packages/gymnasium/core.py", line 328, in reset
    return self.env.reset(seed=seed, options=options)
  File ".../lib/python3.10/site-packages/gymnasium/wrappers/common.py", line 400, in reset
    return super().reset(seed=seed, options=options)
  File ".../lib/python3.10/site-packages/gymnasium/core.py", line 328, in reset
    return self.env.reset(seed=seed, options=options)
  File ".../lib/python3.10/site-packages/gymnasium/wrappers/common.py", line 293, in reset
    return env_reset_passive_checker(self.env, seed=seed, options=options)
  File ".../lib/python3.10/site-packages/gymnasium/utils/passive_env_checker.py", line 185, in env_reset_passive_checker
    result = env.reset(**kwargs)
  File ".../lib/python3.10/site-packages/gym_simplegrid/envs/simple_grid.py", line 102, in reset
    self.start_xy = self.parse_state_option('start_loc', options)
  File ".../lib/python3.10/site-packages/gym_simplegrid/envs/simple_grid.py", line 184, in parse_state_option
    state = options[state_name]
TypeError: 'NoneType' object is not subscriptable
@damat-le
Copy link
Owner

damat-le commented Nov 4, 2024

The migration guide to v1.0.0 for Gymnasium is not updated yet, thus I'm not sure what can have caused the disruption. I also tried to reproduce your problem by running some pieces of code on both versions of gymnasium but I didn't have any issue. Can you provide more information please?

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