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

No registered env with id: RocketLander-v0 #5

Open
ksajan opened this issue Mar 18, 2019 · 5 comments
Open

No registered env with id: RocketLander-v0 #5

ksajan opened this issue Mar 18, 2019 · 5 comments

Comments

@ksajan
Copy link

ksajan commented Mar 18, 2019

Traceback (most recent call last):
File "/home/sajan/gym/gym/envs/registration.py", line 159, in spec
return self.env_specs[id]
KeyError: 'RocketLander-v0'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "ppo.py", line 64, in
env = GymEnvironment(env_name=env_name, log_path="./PPO_log", skip_frames=6)
File "/home/sajan/Documents/PPO-master/agents/environment.py", line 19, in init
self.env = gym.make(env_name)
File "/home/sajan/gym/gym/envs/registration.py", line 183, in make
return registry.make(id, **kwargs)
File "/home/sajan/gym/gym/envs/registration.py", line 125, in make
spec = self.spec(path)
File "/home/sajan/gym/gym/envs/registration.py", line 169, in spec
raise error.UnregisteredEnv('No registered env with id: {}'.format(id))
gym.error.UnregisteredEnv: No registered env with id: RocketLander-v0
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/home/sajan/Documents/PPO-master/agents/environment.py", line 136, in close
self.env.close()
AttributeError: 'GymEnvironment' object has no attribute 'env'

I am getting this error even after making changes and making a gym environment name RocketLander-v0. I don't know what i am doing wrong?

@EmbersArc
Copy link
Owner

It's looking for the unofficial rocket lander environment. This branch should have the necessary changes on top of the latest version of gym: https://github.com/EmbersArc/gym/tree/addRocketLander

@ksajan
Copy link
Author

ksajan commented Mar 19, 2019

I did change the gym env/box2d/env folder by adding rocket_lander.py and changing __init.py file. but It is still showing error as same "GymEnvironment' object has no attribute 'env'". What am I doing wrong?

@EmbersArc
Copy link
Owner

Did you change both init files?

@ksajan
Copy link
Author

ksajan commented Mar 20, 2019

yeah, I did in my original gym folder which i cloned and installed using pip install e . command

@ksajan
Copy link
Author

ksajan commented Mar 20, 2019

it's showing this error
Traceback (most recent call last):
File "ppo.py", line 67, in
env = GymEnvironment(env_name=env_name, log_path="./PPO_log", skip_frames=5)
File "/home/sajan/Documents/Landing-a-SpaceX-Falcon-Heavy-Rocket-master/agents/environment.py", line 20, in init
self.env = gym.make(env_name)
File "/home/sajan/gym/gym/envs/registration.py", line 183, in make
return registry.make(id, **kwargs)
File "/home/sajan/gym/gym/envs/registration.py", line 126, in make
env = spec.make(**kwargs)
File "/home/sajan/gym/gym/envs/registration.py", line 89, in make
cls = load(self._entry_point)
File "/home/sajan/gym/gym/envs/registration.py", line 16, in load
fn = getattr(mod, attr_name)
AttributeError: module 'gym.envs.box2d' has no attribute 'RocketLander'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/home/sajan/Documents/Landing-a-SpaceX-Falcon-Heavy-Rocket-master/agents/environment.py", line 137, in close
self.env.close()
AttributeError: 'GymEnvironment' object has no attribute 'env'

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