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

gym.make("rware:rware-tiny-2ag-v1") assertion error #13

Closed
voltej opened this issue Jun 21, 2022 · 2 comments
Closed

gym.make("rware:rware-tiny-2ag-v1") assertion error #13

voltej opened this issue Jun 21, 2022 · 2 comments

Comments

@voltej
Copy link

voltej commented Jun 21, 2022

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?

@semitable
Copy link
Owner

Possibly related to #10
Could you try downgrading to gym==0.21 ?

@voltej
Copy link
Author

voltej commented Jun 23, 2022

Yes, downgrading solves the issue, should have gone through the existing issues more carefully.
Thanks!

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