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()
when run this code i get this error
AttributeError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/pyglet/__init__.py in __getattr__(self, name)
328 try:
--> 329 return getattr(self._module, name)
330 except AttributeError:
AttributeError: 'NoneType' object has no attribute 'key'
During handling of the above exception, another exception occurred:
NoSuchDisplayException Traceback (most recent call last)
11 frames
/usr/local/lib/python3.7/dist-packages/pyglet/canvas/xlib.py in __init__(self, name, x_screen)
121 self._display = xlib.XOpenDisplay(name)
122 if not self._display:
--> 123 raise NoSuchDisplayException('Cannot connect to "%s"' % name)
124
125 screen_count = xlib.XScreenCount(self._display)
NoSuchDisplayException: Cannot connect to "None"
how do i display the other screen that displays the game i have tried using matplotlib along with all the necc. imports but its very slow and take a long time to complete the above steps so i had to reduce it to 5000 but still it took a long time in this youtube video this person doesnt install and extra packages and the rendering screen appears how do i do that? if its not possible on colab then how do i do it on jupyter notebook. this link