I'm trying to use gym_super_mario_bros and I'm still in the first steps of the code in python but I don't understand why is it giving me this error

ValueError: not enough values to unpack (expected 5, got 4)

no matter how many elements I try to unpack

here is the code

from nes_py.wrappers import JoypadSpace
import gym_super_mario_bros
from gym_super_mario_bros.actions import SIMPLE_MOVEMENT


env = gym_super_mario_bros.make('SuperMarioBros-v0')
env = JoypadSpace(env, SIMPLE_MOVEMENT)

done = True
for step in range(100000):
    if done:
        env.reset()
    state, reward, done, info = env.step(env.action_space.sample())
    env.render()

env.close()

the error is in this line of code state, reward, done, info = env.step(env.action_space.sample())

thank you in advance for your help

I tried to run super_mario using gym and get the random state of the game but it didn't happen and I get this error instead: ValueError: not enough values to unpack (expected 5, got 4)

0

There are 0 best solutions below