rubenvereecken / py-vgdl

VGDL 2.0: A video game description language for AI research

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

got an unexpected keyword argument 'timestep_limit'

maotaitas opened this issue · comments

conda environment
local installation (git clone https://github.com/rubenvereecken/py-vgdl, pip install -e 'py-vgdl[all]')

when running python -m vgdl.util.humanplay.play_vgdl vgdl/games/aliens_lvl0.txt
Error:
Traceback (most recent call last):
File "/miniconda3/envs/pyvgdl/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/miniconda3/envs/pyvgdl/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/py-vgdl/vgdl/util/humanplay/play_vgdl.py", line 13, in
import vgdl.interfaces.gym
File "/py-vgdl/vgdl/interfaces/gym/init.py", line 6, in
register_sample_games()
File "/py-vgdl/vgdl/interfaces/gym/register_samples.py", line 71, in register_sample_games
nondeterministic=True,
File "/miniconda3/envs/pyvgdl/lib/python3.7/site-packages/gym/envs/registration.py", line 153, in register
return registry.register(id, **kwargs)
File "/miniconda3/envs/pyvgdl/lib/python3.7/site-packages/gym/envs/registration.py", line 147, in register
self.env_specs[id] = EnvSpec(id, **kwargs)
TypeError: init() got an unexpected keyword argument 'timestep_limit'

Thanks for bringing this to my attention! It turns out the newer gym changed their interface. We didn't care about timestep_limit anyway. It should work now.

commented

Hi! I just followed the installation instructions on anaconda and I'm getting the same error message (TypeError: init() got an unexpected keyword argument 'timestep_limit'). Thanks!

Should be fixed... for real!

commented

Ha :-)
You mean you fixed it just now? Should I pull and reinstall?

Yes please! Tried and tested with gym==0.15.3.

commented

Thanks!
The error that I'm getting now is

python -m vgdl.util.humanplay.play_vgdl vgdl/games/aliens_lvl0.txt
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
WARNING:vgdl.util.humanplay.human trace_path provided but could not find the gym_recording package
Traceback (most recent call last):
File "/home/matanm/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/matanm/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/mnt/c/Users/mmazor/Documents/software/py-vgdl/vgdl/util/humanplay/play_vgdl.py", line 101, in
main()
File "/mnt/c/Users/mmazor/Documents/software/py-vgdl/vgdl/util/humanplay/play_vgdl.py", line 89, in main
controller = controller_cls(env_name, args.tracedir)
File "/mnt/c/Users/mmazor/Documents/software/py-vgdl/vgdl/util/humanplay/human.py", line 122, in init
self.env.render(mode='human')
File "/mnt/c/Users/mmazor/Documents/software/py-vgdl/vgdl/interfaces/gym/env.py", line 130, in render
self.renderer.init_screen(headless)
File "/mnt/c/Users/mmazor/Documents/software/py-vgdl/vgdl/render/pygame.py", line 42, in init_screen
self.display = pygame.display.set_mode(self.display_dims, pygame.RESIZABLE, 32)
pygame.error: No available video device

But I suspect this must have more to do with the fact that I'm running anaconda from a Windows Subsystem for Linux?