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

cannot run example successfully #10

Open
ZeroAda opened this issue Jun 21, 2022 · 3 comments
Open

cannot run example successfully #10

ZeroAda opened this issue Jun 21, 2022 · 3 comments

Comments

@ZeroAda
Copy link

ZeroAda commented Jun 21, 2022

Thank you for maintaining this repo. But after setting up, I find I cannot run the examples successfully.

For gym interface:

python -m vgdl.util.humanplay.play_vgdl vgdl/games/aliens_lvl0.txt

I got the error:
File "py-vgdl/vgdl/util/humanplay/play_vgdl.py", line 89, in main controller = controller_cls(env_name, args.tracedir) File "py-vgdl/vgdl/util/humanplay/human.py", line 122, in __init__ self.env.render(mode='human') File "/home/.local/share/virtualenvs/py-vgdl-OASzJMAw/lib/python3.9/site-packages/gym/wrappers/order_enforcing.py", line 47, in render raise ResetNeeded( gym.error.ResetNeeded: Cannot callenv.render()before callingenv.reset(), if this is a intended action, set disable_render_order_enforcing=Trueon the OrderEnforcer wrapper.

For pybrain interface, python examples/pybrain/gapworld.py. after fixing a few errors, I got this:

Traceback (most recent call last): File "py-vgdl/examples/pybrain/gapworld.py", line 95, in <module> test_gapworld() File "py-vgdl/examples/pybrain/gapworld.py", line 70, in test_gapworld env = VGDLPybrainEnvironment(game, GapworldObserver(game)) File "/home/.local/share/virtualenvs/py-vgdl-OASzJMAw/lib/python3.9/site-packages/vgdl/state.py", line 96, in __init__ assert issubclass(avatar.physicstype, GridPhysics) AttributeError: 'NoneType' object has no attribute 'physicstype'

I want to use vgdl to write my own games, but the guideline seems a little hard to follow. What should be the first step in this condition?

I'll appreciate it very much if anyone can help.

@ZeroAda ZeroAda changed the title cannot running example successfully cannot run example successfully Jun 21, 2022
@rubenftgd
Copy link

ZeroAda I also have this issue, how did you managed to solve it?

@ZeroAda
Copy link
Author

ZeroAda commented Nov 12, 2023

ZeroAda I also have this issue, how did you managed to solve it?

Hi! unfortunately, I did not continue to work on this.

@braveman123
Copy link

It worked for me by adding self.env.reset() before line 123 in vgdl/util/human.py.

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

3 participants