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

Import error #10

Open
hsvgbkhgbv opened this issue Apr 1, 2022 · 7 comments
Open

Import error #10

hsvgbkhgbv opened this issue Apr 1, 2022 · 7 comments

Comments

@hsvgbkhgbv
Copy link

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

@hsvgbkhgbv
Copy link
Author

I am not sure why this error would happen.

@semitable
Copy link
Owner

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

@aowen87
Copy link

aowen87 commented May 26, 2022

I'm also encountering this issue. Any idea on an ETA for a fix?

@semitable
Copy link
Owner

@aowen87 Have you tried the solution above (downgrading to 0.21)?

@aowen87
Copy link

aowen87 commented May 26, 2022

@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.

@semitable
Copy link
Owner

semitable commented May 26, 2022

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.

@aowen87
Copy link

aowen87 commented May 27, 2022

Sounds good. 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

3 participants