Cannot run interactive.py
See original GitHub issueHi.
I just cloned the repository and tried to run interactive.py, but got the following traceback:
WARN: gym.spaces.Box autodetected dtype as <class ‘numpy.float32’>. Please provide explicit dtype. Traceback (most recent call last): File “bin/interactive.py”, line 21, in <module> env = MultiAgentEnv(world, scenario.reset_world, scenario.reward, scenario.observation, info_callback=None, shared_viewer = False) File “/home/name/code/multiagent-particle-envs/bin/…/multiagent/environment.py”, line 68, in init self.observation_space.append(spaces.Box(low=-np.inf, high=+np.inf, shape=(obs_dim),)) File “/usr/local/lib/python3.5/dist-packages/gym/spaces/box.py”, line 33, in init Space.init(self, shape, dtype) File “/usr/local/lib/python3.5/dist-packages/gym/core.py”, line 161, in init self.shape = None if shape is None else tuple(shape) TypeError: ‘int’ object is not iterable
I have found that I can overcome this particular error if I change (in environment.py row 68
)
self.observation_space.append(spaces.Box(low=-np.inf, high=+np.inf, shape=(obs_dim),))
to
self.observation_space.append(spaces.Box(low=-np.inf, high=+np.inf, shape=(obs_dim,)))
However, then I start getting a whole new bunch of errors.
Any clue as to what to I am doing wrong?
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (3 by maintainers)
Top GitHub Comments
@blobsimulator @ymolists Try with gym version 0.9.5 I had same problem, changing gym helped.
Is there perhaps a directory issue going on now? Thanks a lot for helping out @nikunjparmar828