AnimatedDrawings icon indicating copy to clipboard operation
AnimatedDrawings copied to clipboard

help,AttributeError: 'NoneType' object has no attribute 'decode'

Open ARDUJS opened this issue 1 year ago • 3 comments

os: ubuntu1~18.04 log in to the server without display remotely using ssh

I meet error

image

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'

ARDUJS avatar Apr 20 '23 07:04 ARDUJS

Try following the steps in this comment: https://github.com/facebookresearch/AnimatedDrawings/issues/99#issue-1669192538

hjessmith avatar Apr 20 '23 15:04 hjessmith

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

ARDUJS avatar Apr 21 '23 17:04 ARDUJS

Does headless rendering with mesa work?

hjessmith avatar Apr 24 '23 04:04 hjessmith

Same promblem. How to solve it?

howardgriffin avatar Aug 09 '23 03:08 howardgriffin

Hmm, I got this problem too, after following all steps in #99 image

httzipdev avatar Aug 11 '23 11:08 httzipdev

hey , and now the problem has been resolved ?

tianruci avatar Feb 13 '24 02:02 tianruci

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 image

JiepengTan avatar Jun 05 '24 05:06 JiepengTan