Open taochenshh opened 7 years ago
Can you try to import tflearn after calling .render() ? From the error trace, I cannot see anything linked with tflearn.
@aymericdamien Yes, I can import tflearn after calling.render(). Why does this happen? Is there some conflict between tflearn and gym?
I am not sure what is wrong there :/ We should investigate that
Is there any workaround for this? Facing the same problem :(
Any updates on this? I run the Q learning example and get the same error:
Traceback (most recent call last): File "/root/repos/sc2/farshadTensor/tfLearnGym.py", line 465, in
tf.app.run() File "/root/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "/root/repos/sc2/farshadTensor/tfLearnGym.py", line 462, in main train(session, graph_ops, num_actions, saver) File "/root/repos/sc2/farshadTensor/tfLearnGym.py", line 411, in train env.render() File "/root/tensorflow/local/lib/python2.7/site-packages/gym/core.py", line 150, in render return self._render(mode=mode, close=close) File "/root/tensorflow/local/lib/python2.7/site-packages/gym/core.py", line 286, in _render return self.env.render(mode, close) File "/root/tensorflow/local/lib/python2.7/site-packages/gym/core.py", line 150, in render return self._render(mode=mode, close=close) File "/root/tensorflow/local/lib/python2.7/site-packages/gym/envs/atari/atari_env.py", line 117, in _render from gym.envs.classic_control import rendering File "/root/tensorflow/local/lib/python2.7/site-packages/gym/envs/classic_control/rendering.py", line 23, in from pyglet.gl import File "/root/tensorflow/local/lib/python2.7/site-packages/pyglet/gl/init.py", line 236, in import pyglet.window File "/root/tensorflow/local/lib/python2.7/site-packages/pyglet/window/init.py", line 1817, in args, **kwargs) File "/root/tensorflow/local/lib/python2.7/site-packages/pyglet/window/init.py", line 505, in init config = screen.get_best_config(template_config) File "/root/tensorflow/local/lib/python2.7/site-packages/pyglet/canvas/base.py", line 161, in get_best_config configs = self.get_matching_configs(template) File "/root/tensorflow/local/lib/python2.7/site-packages/pyglet/canvas/xlib.py", line 179, in get_matching_configs configs = template.match(canvas) File "/root/tensorflow/local/lib/python2.7/site-packages/pyglet/gl/xlib.py", line 29, in match have_13 = info.have_version(1, 3) File "/root/tensorflow/local/lib/python2.7/site-packages/pyglet/gl/glx_info.py", line 89, in have_version client = [int(i) for i in client_version.split('.')] ValueError: invalid literal for int() with base 10: 'None'gl._create_shadow_window() File "/root/tensorflow/local/lib/python2.7/site-packages/pyglet/gl/init.py", line 205, in _create_shadow_window _shadow_window = Window(width=1, height=1, visible=False) File "/root/tensorflow/local/lib/python2.7/site-packages/pyglet/window/xlib/init.py", line 163, in init super(XlibWindow, self).init(
I just used the following code. And the code ran fine when
import tflearn
was commented. If I have bothimport tflearn
andenv.render()
, error occurred.The error is like this: