RyanNavillus / Syllabus

Synchronized Curriculum Learning for RL Agents
MIT License
20 stars 15 forks source link

Unbounded Local Error on NethackTaskWrapper #42

Open saptab opened 2 months ago

saptab commented 2 months ago

(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 commented 2 months ago

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