gym.make("rware:rware-tiny-2ag-v1") assertion error
voltej opened this issue · 2 comments
Hello
when all installed by pip, the following code
import gym
env = gym.make("rware:rware-tiny-2ag-v1")
produces this error:
AssertionError Traceback (most recent call last)
/tmp/ipykernel_318/3796930484.py in <cell line: 2>()
1 import gym
----> 2 env = gym.make("rware:rware-tiny-2ag-v1")
~/.conda/envs/default/lib/python3.9/site-packages/gym/envs/registration.py in make(id, max_episode_steps, autoreset, disable_env_checker, kwargs)
590 env_creator = load(spec_.entry_point)
591
--> 592 env = env_creator(_kwargs)
593
594 # Copies the environment creation specification and kwargs to add to the environment specification details
~/.conda/envs/default/lib/python3.9/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
~/.conda/envs/default/lib/python3.9/site-packages/rware/warehouse.py in _use_slow_obs(self)
311 self.observation_space = spaces.Tuple(
312 tuple(
--> 313 [
314 spaces.Dict(
315 OrderedDict(
~/.conda/envs/default/lib/python3.9/site-packages/rware/warehouse.py in (.0)
342 "has_agent": spaces.MultiBinary(1),
343 "direction": spaces.Discrete(4),
--> 344 "local_message": spaces.MultiBinary(
345 self.msg_bits
346 ),
~/.conda/envs/default/lib/python3.9/site-packages/gym/spaces/multi_binary.py in init(self, n, seed)
43 self.n = n = int(n)
44 input_n = (n,)
---> 45 assert (np.asarray(input_n) > 0).all() # n (counts) have to be positive
46
47 super().init(input_n, np.int8, seed)
AssertionError:
What shall I do?
Yes, downgrading solves the issue, should have gone through the existing issues more carefully.
Thanks!