Kautenja / gym-super-mario-bros

An OpenAI Gym interface to Super Mario Bros. & Super Mario Bros. 2 (Lost Levels) on The NES
Other
678 stars 133 forks source link

`unexpected keyword argument 'stages'` when I want to play the game with keyboard #118

Closed zerlinwang closed 1 year ago

zerlinwang commented 1 year ago

Describe the bug

Traceback (most recent call last):
  File "/Users/wangzilin/opt/anaconda3/envs/mario/bin/gym_super_mario_bros", line 8, in <module>
    sys.exit(main())
  File "/Users/wangzilin/opt/anaconda3/envs/mario/lib/python3.8/site-packages/gym_super_mario_bros/_app/cli.py", line 61, in main
    env = gym.make(args.env, stages=args.stages)
  File "/Users/wangzilin/opt/anaconda3/envs/mario/lib/python3.8/site-packages/gym/envs/registration.py", line 200, in make
    return registry.make(id, **kwargs)
  File "/Users/wangzilin/opt/anaconda3/envs/mario/lib/python3.8/site-packages/gym/envs/registration.py", line 105, in make
    env = spec.make(**kwargs)
  File "/Users/wangzilin/opt/anaconda3/envs/mario/lib/python3.8/site-packages/gym/envs/registration.py", line 75, in make
    env = cls(**_kwargs)
TypeError: __init__() got an unexpected keyword argument 'stages'

Reproduction Script

gym_super_mario_bros -e 'SuperMarioBros-v0' -m 'human'

Expected behavior

I want to play the mario game with my keyboard

Screenshots

image
zerlinwang commented 1 year ago

Enviroment configs:

gym                     0.20.0
gym-super-mario-bros    7.4.0
MacOS
z-shell
zerlinwang commented 1 year ago
gym_super_mario_bros -e SuperMarioBrosRandomStages-v0 -m human --stages 1-1

is OK. There may be a bug here.

liu906 commented 1 year ago

I cannot find the 'jump' key, could any one help me...

liu906 commented 1 year ago

It's "O"

zerlinwang commented 1 year ago

I cannot find the 'jump' key, could any one help me...

Maybe show your full bug logs or screenshots?