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

The qmix_rware error message in the running examples is as follows, there is a corresponding solution #38

Open
Yu-zx opened this issue May 11, 2024 · 1 comment
Labels
help wanted Extra attention is needed invalid This doesn't seem right

Comments

@Yu-zx
Copy link

Yu-zx commented May 11, 2024

Traceback (most recent call last):
File "D:/code/DRL/xuance-master-1/examples/qmix/qmix_rware.py", line 311, in
runner = Runner(args)
File "D:/code/DRL/xuance-master-1/examples/qmix/qmix_rware.py", line 70, in init
self.envs = make_envs(args)
File "D:\code\DRL\xuance-master-1\xuance\environment_init_.py", line 129, in make_envs
return REGISTRY_VEC_ENV[config.vectorize]([thunk for _ in range(config.parallels)])
File "D:\code\DRL\xuance-master-1\xuance\environment\robotic_warehouse\robotic_warehouse_vec_env.py", line 6, in init
super(DummyVecEnv_RoboticWarehouse, self).init(env_fns)
File "D:\code\DRL\xuance-master-1\xuance\environment\new_env_mas\new_vec_env_mas.py", line 147, in init
self.envs = [fn() for fn in env_fns]
File "D:\code\DRL\xuance-master-1\xuance\environment\new_env_mas\new_vec_env_mas.py", line 147, in
self.envs = [fn() for fn in env_fns]
File "D:\code\DRL\xuance-master-1\xuance\environment_init
.py", line 78, in _thunk
env = RoboticWarehouseEnv(config, render_mode=config.render_mode)
File "D:\code\DRL\xuance-master-1\xuance\environment\robotic_warehouse\robotic_warehouse_env.py", line 9, in init
self.env = gym.make(ENV_IDs[args.env_id])
File "D:\anaconda3\envs\xuance_env\lib\site-packages\gym\envs\registration.py", line 640, in make
env = env_creator(**_kwargs)
File "D:\anaconda3\envs\xuance_env\lib\site-packages\rware\warehouse.py", line 247, in init
self._use_slow_obs()
File "D:\anaconda3\envs\xuance_env\lib\site-packages\rware\warehouse.py", line 359, in _use_slow_obs
for _ in range(self.n_agents)
File "D:\anaconda3\envs\xuance_env\lib\site-packages\rware\warehouse.py", line 359, in
for _ in range(self.n_agents)
File "D:\anaconda3\envs\xuance_env\lib\site-packages\gym\spaces\multi_binary.py", line 44, in init
assert (np.asarray(input_n) > 0).all() # n (counts) have to be positive
AssertionError

@wenzhangliu
Copy link
Collaborator

For multi-robot warehouse (RWARE) environment, the version of gym is suggeted to be 0.21 according its the offcial instruction (https://github.com/semitable/robotic-warehouse/blob/master/setup.py)..

Hence, when you run this environment with XuanCe, you should downgrade the version of gym by typing
pip install gym==0.21
That will help you solve the problem.

@wenzhangliu wenzhangliu added help wanted Extra attention is needed question Further information is requested invalid This doesn't seem right and removed question Further information is requested labels May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants