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

Unbounded Local Error on NethackTaskWrapper #42

Open
saptab opened this issue May 13, 2024 · 1 comment
Open

Unbounded Local Error on NethackTaskWrapper #42

saptab opened this issue May 13, 2024 · 1 comment

Comments

@saptab
Copy link

saptab commented May 13, 2024

(marl_cc) bash-4.4$ python -m tests.multiprocessing_smoke_tests
/Multi-Agent-Syllabus/syllabus/examples/task_wrappers/init.py:18: UserWarning: Unable to import the following nle dependencies: cv2
warnings.warn(f"Unable to import the following nle dependencies: {e.name}")
/Multi-Agent-Syllabus/syllabus/tests/utils.py:223: UserWarning: Unable to import nle.
warnings.warn("Unable to import nle.")
Traceback (most recent call last):
File "/anaconda3/envs/marl_cc/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/anaconda3/envs/marl_cc/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/Multi-Agent-Syllabus/tests/multiprocessing_smoke_tests.py", line 20, in
nethack_env = create_nethack_env()
File "/Multi-Agent-Syllabus/syllabus/tests/utils.py", line 226, in create_nethack_env
env = NethackTaskWrapper(env)
UnboundLocalError: local variable 'NethackTaskWrapper' referenced before assignment

Is the above unbounded local error due to a Python version mismatch?

@RyanNavillus
Copy link
Owner

The error is due to opencv not being installed as you see at the top of the message. We'll work on cleaning up the imports before the next release but for now you can fix this with pip install opencv-python

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