Import error
hsvgbkhgbv opened this issue · 7 comments
env = gym.make("rware-tiny-2ag-v1")
Traceback (most recent call last):
File "", line 1, in
File "/home/jianhong/anaconda3/envs/mansa/lib/python3.7/site-packages/gym/envs/registration.py", line 676, in make
return registry.make(id, **kwargs)
File "/home/jianhong/anaconda3/envs/mansa/lib/python3.7/site-packages/gym/envs/registration.py", line 520, in make
return spec.make(kwargs)
File "/home/jianhong/anaconda3/envs/mansa/lib/python3.7/site-packages/gym/envs/registration.py", line 140, in make
env = cls(_kwargs)
File "/home/jianhong/anaconda3/envs/mansa/lib/python3.7/site-packages/rware/warehouse.py", line 247, in init
self._use_slow_obs()
File "/home/jianhong/anaconda3/envs/mansa/lib/python3.7/site-packages/rware/warehouse.py", line 359, in _use_slow_obs
for _ in range(self.n_agents)
File "/home/jianhong/anaconda3/envs/mansa/lib/python3.7/site-packages/rware/warehouse.py", line 359, in
for _ in range(self.n_agents)
File "/home/jianhong/anaconda3/envs/mansa/lib/python3.7/site-packages/gym/spaces/multi_binary.py", line 41, in init
assert (np.asarray(input_n) > 0).all(), "n (counts) have to be positive"
AssertionError: n (counts) have to be positiv
I am not sure why this error would happen.
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
I'm also encountering this issue. Any idea on an ETA for a fix?
@aowen87 Have you tried the solution above (downgrading to 0.21)?
Downgrading works, but I have some package dependencies that want a more recent version. It's not a big deal to remove the other packages for now. I'm just curious if there's an ETA for a longer term fix.
Gym seems to be aggressively changing their API recently and fixes seem to be short-lasting. I believe they will release a v1.0 soon which will stabilise their API. I will happily do a pass when they do, and fix any issues.
Sounds good. Thanks!