baselines icon indicating copy to clipboard operation
baselines copied to clipboard

ValueError: too many values to unpack (expected 2)

Open hydro-man opened this issue 3 years ago • 2 comments

When i run the following code to test the model atari_wrapper :

env=atari_wrappers.wrap_deepmind(
    atari_wrappers.make_atari(env_id='PongNoFrameskip-v4'),  # PongNoFrameskip-v4
    clip_rewards=False,
    frame_stack=True,
    scale=False,
)
env.reset()

I got a ValueError:

A.L.E: Arcade Learning Environment (version 0.8.0+919230b)
[Powered by Stella]
Traceback (most recent call last):
  File "C:/Users/HNXCD/Desktop/adaptive-transformers-in-rl-master/Model/test.py", line 18, in <module>
    env.reset()
  File "C:\Users\HNXCD\Desktop\adaptive-transformers-in-rl-master\Model\atari_wrapper2.py", line 205, in reset
    ob = self.env.reset()
  File "D:\app\Anaconda\envs\gym_env\lib\site-packages\gym\core.py", line 379, in reset
    obs, info = self.env.reset(**kwargs)
ValueError: too many values to unpack (expected 2)

I want konw how to fix it?

hydro-man avatar Sep 26 '22 10:09 hydro-man

Hi, I'm having the same problem, too. Have you come up with any solution?

greedjesse avatar Feb 13 '24 15:02 greedjesse

It seems like self.env.reset(**kwargs) doesn't return info but only a nd.array with the shape (210, 160, 3).

greedjesse avatar Feb 13 '24 15:02 greedjesse