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

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

Closed
ARDUJS opened this issue Apr 20, 2023 · 7 comments
Closed

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

ARDUJS opened this issue Apr 20, 2023 · 7 comments

Comments

@ARDUJS
Copy link

ARDUJS commented Apr 20, 2023

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'

@hjessmith
Copy link
Contributor

Try following the steps in this comment:
#99 (comment)

@ARDUJS
Copy link
Author

ARDUJS commented Apr 21, 2023

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

@hjessmith
Copy link
Contributor

Does headless rendering with mesa work?

@hjessmith hjessmith closed this as not planned Won't fix, can't repro, duplicate, stale May 10, 2023
@howardgriffin
Copy link

Same promblem. How to solve it?

@httzipdev
Copy link

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

@tianruci
Copy link

hey , and now the problem has been resolved ?

@JiepengTan
Copy link

JiepengTan commented Jun 5, 2024

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

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

6 participants