AnimatedDrawings
AnimatedDrawings copied to clipboard
help,AttributeError: 'NoneType' object has no attribute 'decode'
os: ubuntu1~18.04 log in to the server without display remotely using ssh
I meet error
Python 3.8.13 (default, Oct 21 2022, 23:50:54) [GCC 11.2.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information.
from animated_drawings import render render.start('./examples/config/mvc/interactive_window_example.yaml') /home/ubuntu/miniconda3/envs/animated_drawings/lib/python3.8/site-packages/glfw/init.py:912: GLFWError: (65544) b'X11: The DISPLAY environment variable is missing' warnings.warn(message, GLFWError) /home/ubuntu/miniconda3/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 "
", line 1, in File "/home/ubuntu/AnimatedDrawings/animated_drawings/render.py", line 17, in start view = View.create_view(cfg.view) File "/home/ubuntu/AnimatedDrawings/animated_drawings/view/view.py", line 47, in create_view return WindowView(view_cfg) File "/home/ubuntu/AnimatedDrawings/animated_drawings/view/window_view.py", line 34, in init self._create_window(*cfg.window_dimensions) # pyright: ignore[reportGeneralTypeIssues] File "/home/ubuntu/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'
Try following the steps in this comment: https://github.com/facebookresearch/AnimatedDrawings/issues/99#issue-1669192538
Try following the steps in this comment: #99 (comment)
Run the following commands:
sudo apt-get install libosmesa6-dev freeglut3-dev sudo apt-get install libglfw3-dev libgles2-mesa-dev sudo apt-get install libosmesa6 export PYOPENGL_PLATFORM=osmesa conda install -c conda-forge libstdcxx-ng conda install -c conda-forge libstdcxx-ng=12 export DISPLAY=":1" or export DISPLAY=":0"
Still failed, I have executed all steps from scratch
Does headless rendering with mesa work?
Same promblem. How to solve it?
Hmm, I got this problem too, after following all steps in #99
hey , and now the problem has been resolved ?
hey , and now the problem has been resolved ? @tianruci
open file ./examples/annotations_to_animation.py
add one line code :
'view': {'USE_MESA':True}, # use MESA for headless server
in here