Wayland: Failed to initialize xkb context
oarcher opened this issue · comments
Olivier ARCHER commented
When running examples on ubuntu 23.04 with wayland:
#!/bin/env python
from animated_drawings import render
render.start('./examples/config/mvc/different_bvh_skeleton_example.yaml')
xkbcommon: ERROR: failed to add default include path /home/oarcher/anaconda3/envs/animated_drawings/share/X11/xkb
/home/oarcher/anaconda3/envs/animated_drawings/lib/python3.8/site-packages/glfw/__init__.py:912: GLFWError: (65544) b'Wayland: Failed to initialize xkb context'
warnings.warn(message, GLFWError)
/home/oarcher/anaconda3/envs/animated_drawings/lib/python3.8/site-packages/glfw/__init__.py:912: GLFWError: (65537) b'The GLFW library is not initialized'
warnings.warn(message, GLFWError)
Traceback (most recent call last):
File "./test.py", line 3, in <module>
render.start('./examples/config/mvc/different_bvh_skeleton_example.yaml')
File "/home/oarcher/Develop/tensor_rc/AnimatedDrawings/animated_drawings/render.py", line 17, in start
view = View.create_view(cfg.view)
File "/home/oarcher/Develop/tensor_rc/AnimatedDrawings/animated_drawings/view/view.py", line 47, in create_view
return WindowView(view_cfg)
File "/home/oarcher/Develop/tensor_rc/AnimatedDrawings/animated_drawings/view/window_view.py", line 34, in __init__
self._create_window(*cfg.window_dimensions) # pyright: ignore[reportGeneralTypeIssues]
File "/home/oarcher/Develop/tensor_rc/AnimatedDrawings/animated_drawings/view/window_view.py", line 126, in _create_window
logging.info(f'OpenGL Version: {GL.glGetString(GL.GL_VERSION).decode()}') # pyright: ignore[reportGeneralTypeIssues]
AttributeError: 'NoneType' object has no attribute 'decode'
Olivier ARCHER commented
The workaround is to set XDG_SESSION_TYPE
env var to x11
before running the example:
export XDG_SESSION_TYPE=x11