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

Wayland: Failed to initialize xkb context #233

Closed
oarcher opened this issue Oct 5, 2023 · 1 comment
Closed

Wayland: Failed to initialize xkb context #233

oarcher opened this issue Oct 5, 2023 · 1 comment

Comments

@oarcher
Copy link

oarcher commented Oct 5, 2023

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'
@oarcher
Copy link
Author

oarcher commented Oct 5, 2023

The workaround is to set XDG_SESSION_TYPE env var to x11 before running the example:

export XDG_SESSION_TYPE=x11

@oarcher oarcher closed this as completed Oct 5, 2023
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

1 participant