Ask coding questions

← Back to all posts
GLX capability
LastedApple3 (0)

I am trying to write some code involving the arcade module in Python. However, when I attempt to import the module, it raises the following error:

Traceback (most recent call last):
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyglet/__init__.py", line 334, in __getattr__
    return getattr(self._module, name)
AttributeError: 'NoneType' object has no attribute 'Window'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 1, in <module>
    import arcade
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/arcade/__init__.py", line 72, in <module>
    from .window_commands import close_window
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/arcade/window_commands.py", line 106, in <module>
    def get_window() -> pyglet.window.Window:
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyglet/__init__.py", line 340, in __getattr__
    __import__(import_name)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyglet/window/__init__.py", line 1909, in <module>
    gl._create_shadow_window()
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyglet/gl/__init__.py", line 206, in _create_shadow_window
    _shadow_window = Window(width=1, height=1, visible=False)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyglet/window/xlib/__init__.py", line 173, in __init__
    super(XlibWindow, self).__init__(*args, **kwargs)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyglet/window/__init__.py", line 596, in __init__
    config = screen.get_best_config(template_config)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyglet/canvas/base.py", line 192, in get_best_config
    configs = self.get_matching_configs(template)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyglet/canvas/xlib.py", line 220, in get_matching_configs
    configs = template.match(canvas)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyglet/gl/xlib.py", line 58, in match
    have_13 = info.have_version(1, 3)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/pyglet/gl/glx_info.py", line 83, in have_version
    raise GLXInfoException('pyglet requires an X server with GLX')
pyglet.gl.glx_info.GLXInfoException: pyglet requires an X server with GLX

Does anyone know how to stop this? I suspect that it raises because the virtual desktop (or whatever) that Replit uses to display windows created by programs does not have whatever capabilities pyglet requires.

Comments
hotnewtop
[deleted]

I forgot to type this earlier but you're correct in your assumption

[deleted]

um... you deleted some files and code... so uh, I have almost nothing to work with... bah whatever I figured it out.

LastedApple3 (0)

@Aphmeta This is all that is necessary to display the problem.

[deleted]

include the repl pls

[deleted]

@LastedApple3 k ima work with it now