You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/path/to/venv/python3.8/site-packages/gym/wrappers/pixel_observation.py in __init__(self, env, pixels_only, render_kwargs, pixel_keys)
131 pixels: np.ndarray = pixels[-1] if isinstance(pixels, List) else pixels
132
--> 133 if np.issubdtype(pixels.dtype, np.integer):
134 low, high = (0, 255)
135 elif np.issubdtype(pixels.dtype, np.float):
AttributeError: 'NoneType' object has no attribute 'dtype'
System Info
Describe the characteristic of your environment:
Describe how Gym was installed (pip, docker, source, ...)
pip install gym --upgrade
What OS/version of Linux you're using. Note that while we will accept PRs to improve Window's support, we do not officially support it.
OsX (x86) and Unix
Python version
3.7, 3.8, 3.9 and 3.10
Checklist
I have checked that there is no similar issue in the repo (required)
EDIT
I guess this is related to this (from the release note)
Render - The render API is changed such that the mode has to be specified during gym.make with the keyword render_mode, after which, the render mode is fixed. For further details see https://younis.dev/blog/2022/render-api/ and #2671. This has the additional changes
with render_mode="human" you don't need to call .render(), rendering will happen automatically on env.step()
with render_mode="rgb_array", .render() pops the list of frames rendered since the last .reset()
with render_mode="single_rgb_array", .render() returns a single frame, like before.
Specifying render_mode="single_rgb_array" solves it, but it is a bc-breaking change. Any chance we can get a default value there?
The text was updated successfully, but these errors were encountered:
Describe the bug
Rendering is broken for simple envs (e.g. Pendulum-v1)
Code example
Error stack:
System Info
Describe the characteristic of your environment:
OsX (x86) and Unix
3.7, 3.8, 3.9 and 3.10
Checklist
EDIT
I guess this is related to this (from the release note)
Specifying
render_mode="single_rgb_array"
solves it, but it is a bc-breaking change. Any chance we can get a default value there?The text was updated successfully, but these errors were encountered: