openai / baselines

OpenAI Baselines: high-quality implementations of reinforcement learning algorithms
MIT License
15.83k stars 4.88k forks source link

ValueError: too many values to unpack (expected 2) #1205

Open hydro-man opened 2 years ago

hydro-man commented 2 years ago

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?

greedjesse commented 9 months ago

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

greedjesse commented 9 months ago

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