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] minihack.scripts.play don't work on Debian 11 #29

Closed
cslr opened this issue Oct 30, 2021 · 3 comments
Closed

[BUG] minihack.scripts.play don't work on Debian 11 #29

cslr opened this issue Oct 30, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@cslr
Copy link

cslr commented Oct 30, 2021

🐛 Bug

After installing minihack+nle to Debian 11 the following commands work:

import gym
import minihack
env = gym.make("MiniHack-River-v0")
env.reset() # each reset generates a new environment instance
env.step(1) # move agent '@' north
env.render()

But when running

python3 -m minihack.scripts.play --env MiniHack-River-v0

The program fails to errors.

To Reproduce

Steps to reproduce the behavior:

  1. Install Debian 11. Install minihack+nle (+deps) using pip install/apt-get commands.
  2. python3 -m minihack.scripts.play --env MiniHack-River-v0

Error messages/traceback:

Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.9/dist-packages/minihack/scripts/play.py", line 334, in
main()
File "/usr/local/lib/python3.9/dist-packages/minihack/scripts/play.py", line 330, in main
play(**vars(flags))
File "/usr/local/lib/python3.9/dist-packages/minihack/scripts/play.py", line 123, in play
print("Available actions:", env._actions)
File "/home/optimus/.local/lib/python3.9/site-packages/gym/core.py", line 235, in getattr
raise AttributeError(
AttributeError: attempted to get missing private attribute '_actions'

Expected behavior

One should be able to play minihack using keyboard commands.

Environment

Collecting environment information...

MiniHack version: 0.1.1
NLE version: 0.7.3
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A

OS: Debian GNU/Linux 11 (bullseye)
GCC version: (Debian 10.2.1-6) 10.2.1 20210110
CMake version: version 3.18.4

Python version: 3.9
Is CUDA available: N/A
CUDA runtime version: Could not collect
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect

Versions of relevant libraries:
[pip3] msgpack-numpy==0.4.7.1
[pip3] numpy==1.19.5
[conda] Could not collect

Additional context

No Anaconda installed.

@cslr cslr added the bug Something isn't working label Oct 30, 2021
@heiner
Copy link

heiner commented Oct 30, 2021

I suspect this is related to the latest update of the gym library. The env object now gets wrapped automatically, which hides the _action attribute (which we really shouldn't be accessing like this anyway).

@samvelyan
Copy link
Contributor

Hi @csrl. Could you please confirm your gym version? The updated environment collection script will print this out for you.

MiniHack currently has support for Gym versions < 20. However, we will add support for the most recent versions of Gym very soon.

@samvelyan
Copy link
Contributor

Resolved in #31. Feel free to reopen if there are any further problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants