handful-of-trials-pytorch icon indicating copy to clipboard operation
handful-of-trials-pytorch copied to clipboard

NotImplementedError with gym 0.17.2

Open 2000222 opened this issue 4 years ago • 2 comments

I just run " python mbexp.py -env reacher" with gym 0.17.2, but get the following traceback: Traceback (most recent call last): File "mbexp.py", line 64, in main(args.env, "MPC", args.ctrl_arg, args.override, args.logdir) File "mbexp.py", line 37, in main cfg = create_config(env, ctrl_type, ctrl_args, overrides, logdir) File "/home/ubuntu/data/handful-of-trials-pytorch/config/default.py", line 54, in create_config cfg_module = cfg_source.CONFIG_MODULE() File "/home/ubuntu/data/handful-of-trials-pytorch/config/reacher.py", line 99, in init self.ENV = gym.make(self.ENV_NAME) File "/home/ubuntu/miniconda3/lib/python3.7/site-packages/gym/envs/registration.py", line 145, in make return registry.make(id, **kwargs) File "/home/ubuntu/miniconda3/lib/python3.7/site-packages/gym/envs/registration.py", line 90, in make env = spec.make(kwargs) File "/home/ubuntu/miniconda3/lib/python3.7/site-packages/gym/envs/registration.py", line 60, in make env = cls(_kwargs) File "/home/ubuntu/data/handful-of-trials-pytorch/env/reacher.py", line 18, in init mujoco_env.MujocoEnv.init(self, os.path.join(dir_path, 'assets/reacher3d.xml'), 2) File "/home/ubuntu/miniconda3/lib/python3.7/site-packages/gym/envs/mujoco/mujoco_env.py", line 64, in init observation, _reward, done, _info = self.step(action) File "/home/ubuntu/miniconda3/lib/python3.7/site-packages/gym/core.py", line 56, in step raise NotImplementedError NotImplementedError

Could anyone give me some solutions? Thank you.

2000222 avatar Jun 14 '20 03:06 2000222

Update: I guess I find the issue. Simply change the version of the gym by the following code:

pip install gym==0.8.2

I met the same issue when I ran this code. Hope someone can help us out.

jingwu6 avatar Nov 05 '20 20:11 jingwu6