facebookresearch / AnimatedDrawings

Code to accompany "A Method for Animating Children's Drawings of the Human Figure"
MIT License
10.62k stars 934 forks source link

AttributeError: 'NoneType' object has no attribute 'decode' #263

Closed hetianlong88 closed 8 months ago

hetianlong88 commented 10 months ago

After starting up a Python interpreter. (animated_drawings) root@container:~/AnimatedDrawings# python 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/export_mp4_example.yaml') /root/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) /root/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 "/root/AnimatedDrawings/animated_drawings/render.py", line 17, in start view = View.create_view(cfg.view) File "/root/AnimatedDrawings/animated_drawings/view/view.py", line 47, in create_view return WindowView(view_cfg) File "/root/AnimatedDrawings/animated_drawings/view/window_view.py", line 34, in init self._create_window(*cfg.window_dimensions) # pyright: ignore[reportGeneralTypeIssues] File "/root/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'

What's going to happen to this problem? Installing Ubuntu 18.04 operating system,GPU TITAN Xp(12GB).

lbj96347 commented 10 months ago

If echo $DISPLAY returns nothing, then try export DISPLAY=:0.0 before running all sample.

hetianlong88 commented 10 months ago

thanks,It's been resolved.

tianruci commented 9 months ago

export DISPLAY=:0.0

hey but how ..