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

[Question] Too many values to unpack issue #3299

Open
sohv opened this issue Oct 31, 2024 · 3 comments
Open

[Question] Too many values to unpack issue #3299

sohv opened this issue Oct 31, 2024 · 3 comments

Comments

@sohv
Copy link

sohv commented Oct 31, 2024

Hey,
I wrote the below code to initialize an instance of SpaceInvaders environment, run 1000 iterations to perform a random action from the sample space and render the environment in real-time.
import gym
env = gym.make("ALE/SpaceInvaders-v5")
env.reset()
for _ in range(1000):
env.step(env.action_space.sample())
env.render()
env.close()
But, I am encountering an error on env.step line that states ' ValueError: too many values to unpack (expected 4)'. I tried modifying that line to return 4 values and also downgraded gym version to check if it's working but to no use. Can you help me resolve this issue?

@pseudo-rnd-thoughts
Copy link
Contributor

What version of gym are you using?

@sohv
Copy link
Author

sohv commented Nov 2, 2024

What version of gym are you using?

gym 0.21

@pseudo-rnd-thoughts
Copy link
Contributor

I can't replicate the problem with the code provided.
Are you using gym with another project?

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

2 participants