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

gym.error.NameNotFound: Environment intersection doesn't exist. #95

Open
Lucyliu09 opened this issue Mar 23, 2023 · 3 comments
Open

gym.error.NameNotFound: Environment intersection doesn't exist. #95

Lucyliu09 opened this issue Mar 23, 2023 · 3 comments

Comments

@Lucyliu09
Copy link

Lucyliu09 commented Mar 23, 2023

Hi,thanks for your work first!

But when I'm trying to run
'python experiments.py evaluate configs/IntersectionEnv/env.json
configs/IntersectionEnv/agents/DQNAgent/ego_attention_2h.json
--train --episodes=4000 --name-from-config'

Something wrong happend:

import_module highway_env
Traceback (most recent call last):
File "/.local/lib/python3.9/site-packages/rl_agents/agents/common/factory.py", line 76, in load_environment
env = gym.make(env_config['id'],render_mode='rgb_array')
File "/.local/lib/python3.9/site-packages/gym/envs/registration.py", line 569, in make
_check_version_exists(ns, name, version)
File "/.local/lib/python3.9/site-packages/gym/envs/registration.py", line 219, in _check_version_exists
_check_name_exists(ns, name)
File "/.local/lib/python3.9/site-packages/gym/envs/registration.py", line 197, in _check_name_exists
raise error.NameNotFound(
gym.error.NameNotFound: Environment intersection doesn't exist.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/rl-agents-master/rl-agents-master/scripts/experiments.py", line 150, in
main()
File "/rl-agents-master/rl-agents-master/scripts/experiments.py", line 45, in main
evaluate(opts[''], opts[''], opts)
File "/rl-agents-master/rl-agents-master/scripts/experiments.py", line 61, in evaluate
env = load_environment(environment_config)
File "/.local/lib/python3.9/site-packages/rl_agents/agents/common/factory.py", line 85, in load_environment
raise gym.error.UnregisteredEnv('Environment {} not registered. The environment module should be specified by '
gym.error.UnregisteredEnv: Environment intersection-v0 not registered. The environment module should be specified by the "import_module" key of the environment configuration

I've aleardy installed all the packages required,and I tried to find a solution online, but it didn't work.
Hope to receive your replay!

@Lucyliu09
Copy link
Author

Well,I've found your earlier replay about the similiar issue.https://github.com/eleurent/highway-env/issues/431

Still thanks a lot!

But there's something wrong about visualization(The screen of videos saved are black.)
And I couldn't find out the cause of the problem.

Hope to receive your replay!

@eleurent
Copy link
Owner

eleurent commented Mar 25, 2023

That is strange, I am unable to reproduce this issue of the videos being black.
You can for example run this colab, which produces a correct video.

@siatjia
Copy link

siatjia commented Jul 22, 2023

i have the same error, and how to register the IntersectionEnv?

l solve it, in experiment.py, add the following,

import highway_env
highway_env.register_highway_envs()

enjoy it

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