Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

dqn_drone.py returns error: Observation Space must be an image or dictionary observation space #50

Open
shashwatkansal opened this issue May 16, 2023 · 1 comment

Comments

@shashwatkansal
Copy link

shashwatkansal commented May 16, 2023

Bug report

  • AirSim Version/#commit: 052228a
  • UE/Unity version: 5.1.1
  • autopilot version:
  • OS Version: Windows11 Version 22H2, OS Build 22621.1702

What's the issue you encountered?

I have built AirSim, I run the environments Blocks (or any other environment such as MountainLandscape), and upon running, then I navigate in terminal and run in a python pipenv (Python 3.9.12) PythonClient/reinforcement_learning/dqn_drone.py. The DQN starts off and very shortly thereafter returns an error

<stable_baselines3.common.vec_env.dummy_vec_env.DummyVecEnv object at 0x000001EAC077CFD0>
Traceback (most recent call last):
  File "C:\Users\shash\Documents\Thesis\Colosseum\PythonClient\reinforcement_learning\dqn_drone.py", line 28, in <module>
    env = VecTransposeImage(env)
  File "C:\Users\shash\.virtualenvs\PythonClient-mo3ke7LZ\lib\site-packages\stable_baselines3\common\vec_env\vec_transpose.py", line 22, in __init__
    assert is_image_space(venv.observation_space) or isinstance(
AssertionError: The observation space must be an image or dictionary observation space

This is purely based on default files without edits. Unsure how to go about fixing this?

@shashwatkansal shashwatkansal changed the title Unable to properly run dqn_drone.py dqn_drone.py returns error: Observation Space must be an image or dictionary observation space May 16, 2023
@BetterLL
Copy link

oh I have the same question, how do you solve it?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants