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

env.reset() returns TypeError: JoypadSpace.reset() got an unexpected keyword argument 'seed' error while using DummyVecEnv wrapper #96

Open
rohitsaikrishnan opened this issue Dec 24, 2023 · 0 comments

Comments

@rohitsaikrishnan
Copy link

Describe the bug

A clear and concise description of what the bug is.
I am facing this error
TypeError: JoypadSpace.reset() got an unexpected keyword argument 'seed'
when using DummyVecEnv and env.reset() after vectorization. can anyone please help

Similar to the error here:
https://stackoverflow.com/questions/76509663/typeerror-joypadspace-reset-got-an-unexpected-keyword-argument-seed-when-i
openai/gym#2531 (comment)

To Reproduce

Steps to reproduce the behavior:
!pip install nes-py
!pip install gym-super-mario-bros
!pip install stable-baselines3[extra]
import gym_super_mario_bros
from gym_super_mario_bros.actions import SIMPLE_MOVEMENT
from nes_py.wrappers import JoypadSpace
from gym.wrappers import GrayScaleObservation, FrameStack
from gym.wrappers import ResizeObservation
#Import Vectorization wrappers
from stable_baselines3.common.vec_env import VecFrameStack, DummyVecEnv
env = gym_super_mario_bros.make('SuperMarioBros-v0')
env = JoypadSpace(env, SIMPLE_MOVEMENT)
env = GrayScaleObservation(env, keep_dim=True)
env = DummyVecEnv([lambda: env])
env = VecFrameStack(env, 4, channels_order='last')
state = env.reset()

Expected behavior

A clear and concise description of what you expected to happen.
should return start state of mario game environment with 4 stacked frames

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

  • Operating System: Google Colab
  • Python version: 3.10
  • C++ compiler and version:

Additional context

Add any other context about the problem here.

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

1 participant