Skip to content
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] Pygame opening windows with render_mode=rgb_array in Lunar Lander environment #2924

Closed
1 task done
CooKySch opened this issue Jun 24, 2022 · 3 comments
Closed
1 task done

Comments

@CooKySch
Copy link

If you are submitting a bug report, please fill in the following details and use the tag [bug].

Describe the bug
I'm using the environment LunarLander-v2, continuous. I want to save the images made by env.render(), but not necessarily check them, so I used rgb-array as rendering option. Yet, pygame windows keep popping up when I use this.

Code example
if render:
frames.append(env.render(mode="rgb_array"))

System Info
Describe the characteristic of your environment:
Gym was installed with pip using a given requirements.txt. I'm using 0.22.0
Pop-OS 22.04
3.10

Additional context
Add any other context about the problem here.

Checklist

  • I have checked that there is no similar issue in the repo (required)
@pseudo-rnd-thoughts
Copy link
Contributor

Thanks for the bug report, I can confirm that on 0.24.0 that this is an issue with

import time

import gym

env = gym.make("LunarLander-v2")
env.reset()
env.render(mode="rgb_array")
time.sleep(2)
env.step(env.action_space.sample())
env.render(mode="rgb_array")
time.sleep(2)
env.close()

However, #2671 has seemed to have fixed this bug which will be released in v0.25

@jkterry1
Copy link
Collaborator

jkterry1 commented Jul 6, 2022

Hey, I'm closing this issue as it's fixed on master

@jkterry1 jkterry1 closed this as completed Jul 6, 2022
@eabase
Copy link

eabase commented May 9, 2024

@pseudo-rnd-thoughts
How do you set the window size to something larger?

The lander is always starting outside the view port.
I think it's set to 600*800 or something, and I want it much larger.

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

No branches or pull requests

4 participants