EmbersArc / PPO

PPO implementation for OpenAI gym environment based on Unity ML Agents
148 stars 21 forks source link

No registered env with id: RocketLander-v0 #5

Open ksajan opened 5 years ago

ksajan commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

Did you change both init files?

ksajan commented 5 years ago

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

ksajan commented 5 years ago

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'