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

can't apply this __setattr__ to instance object #9

Open
0ze3r0 opened this issue May 31, 2020 · 1 comment
Open

can't apply this __setattr__ to instance object #9

0ze3r0 opened this issue May 31, 2020 · 1 comment

Comments

@0ze3r0
Copy link

0ze3r0 commented May 31, 2020

@gsurma when i run it without rendering it run's fine but when i enable rendering it gives me this error

Traceback (most recent call last):
File "atari.py", line 100, in
Atari()
File "atari.py", line 20, in init
self._main_loop(self._game_model(game_mode, game_name, env.action_space.n), env, render, total_step_limit, total_run_limit, clip)
File "atari.py", line 45, in _main_loop
env.render()
File "/home/overthinker/.local/lib/python2.7/site-packages/gym/core.py", line 235, in render
return self.env.render(mode, **kwargs)
File "/home/overthinker/.local/lib/python2.7/site-packages/gym/core.py", line 235, in render
return self.env.render(mode, **kwargs)
File "/home/overthinker/.local/lib/python2.7/site-packages/gym/core.py", line 235, in render
return self.env.render(mode, **kwargs)
File "/home/overthinker/.local/lib/python2.7/site-packages/gym/core.py", line 235, in render
return self.env.render(mode, **kwargs)
File "/home/overthinker/.local/lib/python2.7/site-packages/gym/core.py", line 235, in render
return self.env.render(mode, **kwargs)
File "/home/overthinker/.local/lib/python2.7/site-packages/gym/core.py", line 235, in render
return self.env.render(mode, **kwargs)
File "/home/overthinker/.local/lib/python2.7/site-packages/gym/envs/atari/atari_env.py", line 152, in render
from gym.envs.classic_control import rendering
File "/home/overthinker/.local/lib/python2.7/site-packages/gym/envs/classic_control/rendering.py", line 27, in
from pyglet.gl import *
File "/home/overthinker/.local/lib/python2.7/site-packages/pyglet/gl/init.py", line 95, in
from pyglet.gl.lib import GLException
File "/home/overthinker/.local/lib/python2.7/site-packages/pyglet/gl/lib.py", line 149, in
from pyglet.gl.lib_glx import link_GL, link_GLU, link_GLX
File "/home/overthinker/.local/lib/python2.7/site-packages/pyglet/gl/lib_glx.py", line 38, in
import pyglet.lib
File "/home/overthinker/.local/lib/python2.7/site-packages/pyglet/lib.py", line 55, in
script_path = pyglet.resource.get_script_home()
File "/home/overthinker/.local/lib/python2.7/site-packages/pyglet/init.py", line 337, in getattr
object.setattr(self, '_module', module)
TypeError: can't apply this setattr to instance object

@phantom-balance
Copy link

I had the same issue while using gym while using python version 2.7, I just upgraded to python 3.5 in my virtual environment and it seems to fix the issue. Here is a link that might be helpful if you want to know more about it Link.

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

2 participants