gym.make gives an error
shah-yash753 opened this issue · 3 comments
AssertionError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_22856\2368146761.py in
----> 1 env = gym.make("rware-tiny-2ag-v1")
~\AppData\Local\Programs\Python\Python37\lib\site-packages\gym\envs\registration.py in make(id, **kwargs)
674 # fmt: on
675 def make(id: str, **kwargs) -> "Env":
--> 676 return registry.make(id, **kwargs)
677
678
~\AppData\Local\Programs\Python\Python37\lib\site-packages\gym\envs\registration.py in make(self, path, **kwargs)
518 spec = self.spec(path)
519 # Construct the environment
--> 520 return spec.make(**kwargs)
521
522 def all(self):
~\AppData\Local\Programs\Python\Python37\lib\site-packages\gym\envs\registration.py in make(self, kwargs)
138 else:
139 cls = load(self.entry_point)
--> 140 env = cls(_kwargs)
141
142 # Make the environment aware of which spec it came from.
~\AppData\Local\Programs\Python\Python37\lib\site-packages\rware\warehouse.py in init(self, shelf_columns, column_height, shelf_rows, n_agents, msg_bits, sensor_range, request_queue_size, max_inactivity_steps, max_steps, reward_type, fast_obs, layout)
245 self.fast_obs = None
246 self.observation_space = None
--> 247 self._use_slow_obs()
248
249 # for performance reasons we
~\AppData\Local\Programs\Python\Python37\lib\site-packages\rware\warehouse.py in _use_slow_obs(self)
357 )
358 )
--> 359 for _ in range(self.n_agents)
360 ]
361 )
~\AppData\Local\Programs\Python\Python37\lib\site-packages\rware\warehouse.py in (.0)
357 )
358 )
--> 359 for _ in range(self.n_agents)
360 ]
361 )
~\AppData\Local\Programs\Python\Python37\lib\site-packages\gym\spaces\multi_binary.py in init(self, n, seed)
39 input_n = (n,)
40
---> 41 assert (np.asarray(input_n) > 0).all(), "n (counts) have to be positive"
42
43 super().init(input_n, np.int8, seed)
AssertionError: n (counts) have to be positive
Hi!
Could you try downgrading to gym==0.21 ?
I think gym broke a few things (again). I'll get to fixing for the latest version soon, but for now please try pip install gym==0.21.0
Yes, downgrading works, thank you