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

[Bug Report] manual_control.py is crashing with AttributeError: 'OrderEnforcing' object has no attribute 'actions' #118

Open
1 task done
Vladimir-Yashin opened this issue Dec 19, 2024 · 0 comments

Comments

@Vladimir-Yashin
Copy link
Contributor

Describe the bug
Launching manual_control.py with no arguments (so with default env MiniWorld-Hallway-v0) crashes on any keypress (kbd arrow keys, ENTER etc.)

System Info

  • Miniworld is installed as pip install -e . from git master:
    (hab) ⏺ Miniworld/scripts % uv pip list | egrep -i 'miniworld|gym' ⏱ 13:37:37
    Using Python 3.12.3 environment at: /home/vlad/hab/.venv
    gymnasium 1.0.0
    miniworld 2.0.0 /home/vlad/hab/Miniworld

  • OS: Ubuntu 24.04

  • Python 3.12.3

CLI output

(hab) ⏺ Miniworld/scripts % ./manual_control.py                      ⏱ 13:29:13
Miniworld v2.0.0, Env: MiniWorld-Hallway-v0
============
Instructions
============
move: arrow keys
pickup: P
drop: D
done: ENTER
quit: ESC
============
Traceback (most recent call last):
  File "/home/vlad/hab/Miniworld/scripts/./manual_control.py", line 43, in <module>
    main()
  File "/home/vlad/hab/Miniworld/scripts/./manual_control.py", line 39, in main
    manual_control.run()
  File "/home/vlad/hab/Miniworld/miniworld/manual_control.py", line 74, in run
    pyglet.app.run()
  File "/home/vlad/hab/.venv/lib/python3.12/site-packages/pyglet/app/__init__.py", line 107, in run
    event_loop.run()
  File "/home/vlad/hab/.venv/lib/python3.12/site-packages/pyglet/app/base.py", line 170, in run
    platform_event_loop.step(timeout)
  File "/home/vlad/hab/.venv/lib/python3.12/site-packages/pyglet/app/xlib.py", line 121, in step
    device.select()
  File "/home/vlad/hab/.venv/lib/python3.12/site-packages/pyglet/canvas/xlib.py", line 205, in select
    dispatch(e)
  File "/home/vlad/hab/.venv/lib/python3.12/site-packages/pyglet/window/xlib/__init__.py", line 979, in dispatch_platform_event
    event_handler(e)
  File "/home/vlad/hab/.venv/lib/python3.12/site-packages/pyglet/window/xlib/__init__.py", line 1166, in _event_key
    return self._event_key_view(ev)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vlad/hab/.venv/lib/python3.12/site-packages/pyglet/window/xlib/__init__.py", line 1147, in _event_key_view
    self.dispatch_event('on_key_press', symbol, modifiers)
  File "/home/vlad/hab/.venv/lib/python3.12/site-packages/pyglet/window/__init__.py", line 1353, in dispatch_event
    if EventDispatcher.dispatch_event(self, *args) != False:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vlad/hab/.venv/lib/python3.12/site-packages/pyglet/event.py", line 408, in dispatch_event
    if handler(*args):
       ^^^^^^^^^^^^^^
  File "/home/vlad/hab/Miniworld/miniworld/manual_control.py", line 59, in on_key_press
    self.step(self.env.actions.done)
              ^^^^^^^^^^^^^^^^
AttributeError: 'OrderEnforcing' object has no attribute 'actions'

Checklist

  • I have checked that there is no similar issue in the repo (required)
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

1 participant