question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot run interactive.py

See original GitHub issue

Hi.

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:closed
  • Created 6 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
yakotakicommented, Feb 28, 2018

@blobsimulator @ymolists Try with gym version 0.9.5 I had same problem, changing gym helped.

2reactions
blobsimulatorcommented, Jan 30, 2018

Traceback (most recent call last): File “bin/interactive.py”, line 23, in <module> env.render() File “/usr/local/lib/python3.5/dist-packages/gym/core.py”, line 110, in render raise NotImplementedError NotImplementedError

Is there perhaps a directory issue going on now? Thanks a lot for helping out @nikunjparmar828

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code: Can't run Python Interactive Window - Stack Overflow
I was trying to run the Interactive Window in a brand new Anaconda environment. This means I did not have Jupyter Notebook installed...
Read more >
Cannot open / start a Python Interactive Window or Jupyter ...
It looks like this is caused by the Python extension. Please file it with the repository here. Make sure to check their issue...
Read more >
2. Using the Python Interpreter — Python 3.11.1 documentation
If that doesn't work, you can exit the interpreter by typing the following command: quit() . The interpreter's line-editing features include interactive ...
Read more >
Python Programming/Interactive mode - Wikibooks
Python has two basic modes: script and interactive. The normal mode is the mode where the scripted and finished .py files are run...
Read more >
Working with Jupyter code cells in the Python Interactive window
You can also run code cells using (Ctrl+Enter) or the Python: Run Selection/Line in Python Terminal command (Shift+Enter). After using this command, the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found