You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Installed the library, was able to run the single player one liner. Tried making a py file with the example code, and getting the error below.
Example code, ive named testGym.py:
GNU nano 4.8 testGym.py
from nes_py.wrappers import JoypadSpace
import gym_tetris
from gym_tetris.actions import MOVEMENT
done = True
for step in range(5000):
if done:
state = env.reset()
state, reward, done, info = env.step(env.action_space.sample())
env.render()
env.close()
____________________________________________________-
error i receive:
(base) peter@peter-VirtualBox:~/TetrisAIProject$ python testGym.py
Traceback (most recent call last):
File "/home/peter/conda3/lib/python3.7/site-packages/gym/envs/registration.py", line 121, in spec
return self.env_specs[id]
KeyError: 'Tetris-v0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "testGym.py", line 5, in
env = gym_tetris.make('Tetris-v0')
File "/home/peter/conda3/lib/python3.7/site-packages/gym/envs/registration.py", line 145, in make
return registry.make(id, **kwargs)
File "/home/peter/conda3/lib/python3.7/site-packages/gym/envs/registration.py", line 89, in make
spec = self.spec(path)
File "/home/peter/conda3/lib/python3.7/site-packages/gym/envs/registration.py", line 131, in spec
raise error.UnregisteredEnv('No registered env with id: {}'.format(id))
gym.error.UnregisteredEnv: No registered env with id: Tetris-v0
(base) peter@peter-VirtualBox:~/TetrisAIProject$ testGym.py
testGym.py: command not found
The text was updated successfully, but these errors were encountered:
Installed the library, was able to run the single player one liner. Tried making a py file with the example code, and getting the error below.
Example code, ive named testGym.py:
GNU nano 4.8 testGym.py
from nes_py.wrappers import JoypadSpace
import gym_tetris
from gym_tetris.actions import MOVEMENT
env = gym_tetris.make('Tetris-v0')
env = JoypadSpace(env, MOVEMENT)
done = True
for step in range(5000):
if done:
state = env.reset()
state, reward, done, info = env.step(env.action_space.sample())
env.render()
env.close()
____________________________________________________-
error i receive:
(base) peter@peter-VirtualBox:~/TetrisAIProject$ python testGym.py
Traceback (most recent call last):
File "/home/peter/conda3/lib/python3.7/site-packages/gym/envs/registration.py", line 121, in spec
return self.env_specs[id]
KeyError: 'Tetris-v0'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "testGym.py", line 5, in
env = gym_tetris.make('Tetris-v0')
File "/home/peter/conda3/lib/python3.7/site-packages/gym/envs/registration.py", line 145, in make
return registry.make(id, **kwargs)
File "/home/peter/conda3/lib/python3.7/site-packages/gym/envs/registration.py", line 89, in make
spec = self.spec(path)
File "/home/peter/conda3/lib/python3.7/site-packages/gym/envs/registration.py", line 131, in spec
raise error.UnregisteredEnv('No registered env with id: {}'.format(id))
gym.error.UnregisteredEnv: No registered env with id: Tetris-v0
(base) peter@peter-VirtualBox:~/TetrisAIProject$ testGym.py
testGym.py: command not found
The text was updated successfully, but these errors were encountered: