-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
[Bug Report] Nothing shows up when rendering environments? #338
Comments
Thanks for the issue, I will have a look into it |
Can you try the following code import gymnasium as gym
env = gym.make("MiniGrid-Empty-5x5-v0", render_mode="human", screen_size=640)
observation, info = env.reset(seed=42)
for _ in range(1000):
action = env.action_space.sample() # User-defined policy function
observation, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
observation, info = env.reset()
env.close() and see if you see anything? |
@BolunDai0216 I had been using that exact code but without the screen_size parameter... I guess that makes all the difference because it's working as expected now. Thanks so much! |
The issue is we have set a really small You can try removing the Thanks for pointing this issue out, we'll update the default screen size. |
Hi everyone, sorry if this has been covered or deemed too basic but I'm really having an issue here.
When I try to render an environment exactly as it's done in the example code here I simply get a blank window. I'm using windows 11 and currently running python 3.10.10 through a VS code jupyter notebook. I have minigrid 2.2.0, gymnasium 0.26.3, and pygame 2.3.0. However I've tried meddling with different versions of all these things and no configuration seems to work for me, even using the older version of minigrid that runs with matplotlib instead of pygame just produces a blank plot. I am able to get the expected window when running manual_control.py but nothing when trying to use minigrid as intended outside of that. I'm also able to render base gym environments with pygame, eg the lunar landing environment. I'd very much appreciate any help anyone could give me, thanks.
The text was updated successfully, but these errors were encountered: