Error description
When running vibe, the CentOS
server without display is used. When using pyrender
for off screen
rendering, errors are reported OpenGL.error.GLError: GLError(err = 12296
), as follows:
Traceback (most recent call last):
File "demo.py", line 416, in <module>
main(args)
File "demo.py", line 278, in main
renderer = Renderer(resolution=(orig_width, orig_height), orig_img=True, wireframe=args.wireframe)
File "***/VIBE/lib/utils/renderer.py", line 60, in __init__
point_size=1.0
File "***/anaconda3/envs/vibe-env/lib/python3.7/site-packages/pyrender/offscreen.py", line 31, in __init__
self._create()
File "***/anaconda3/envs/vibe-env/lib/python3.7/site-packages/pyrender/offscreen.py", line 134, in _create
self._platform.init_context()
File "***/anaconda3/envs/vibe-env/lib/python3.7/site-packages/pyrender/platforms/egl.py", line 177, in init_context
assert eglInitialize(self._egl_display, major, minor)
File "***/anaconda3/envs/vibe-env/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py", line 409, in __call__
return self( *args, **named )
File "***/anaconda3/envs/vibe-env/lib/python3.7/site-packages/OpenGL/error.py", line 232, in glCheckError
baseOperation = baseOperation,
OpenGL.error.GLError: GLError(
err = 12296,
baseOperation = eglInitialize,
cArguments = (
<OpenGL._opaque.EGLDisplay_pointer object at 0x7f883a03a170>,
c_long(0),
c_long(0),
),
result = 0
)
Solution
Ubuntu: https://pyrender.readthedocs.io/en/latest/install/index.html#installmesa Use OSMesa
to offscreen render
.
It is more convenient to use · CONDA · to install osmesa
as follows:
conda install osmesa
Note: after installing osmesa
, reinstall pyopengl
, otherwise an error will still be reported, as follows:
pip uninstall pyopengl
git clone https://github.com/mmatl/pyopengl.git
pip install ./pyopengl
Specify PYOPENGL_PLATFORM
before running the scriptis osmesa
, as follows:
# demp.py
import os
# os.environ['PYOPENGL_PLATFORM'] = 'egl'
os.environ['PYOPENGL_PLATFORM'] = 'osmesa'
Note: os.environ[‘PYOPENGL_PLATFORM’] = ‘osmesa’ should ideally follow import os to ensure that PYOPENGL_PLATFORM is changed to osmesa before using render, or you can explicitly specify os.environ before using render specifically [‘PYOPENGL_PLATFORM’] = ‘osmesa’.
Read More:
- TypeError: res.render is not a function
- [Vue warn]: Error in render: TypeError: Cannot read property ‘xxxx’of undefined
- [Solved] Vue Error: Failed to mount component: template or render function not defined
- Template Render Error Solution (Hexo blog theme, GIT upload)
- Vue error in render: “typeerror: cannot read property ‘length’ of undefined”
- VUE: Property or method “deleteFun“ is not defined on the instance but referenced during render. [How to Fix]
- [Solved] vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in render: “TypeError: Cannot read property ‘length‘
- [Solved] VUE Use Filters Error: [Vue warn]: Error in render: “TypeError: Cannot read property ‘toFixed’ of undefined”
- vscode: Error loading workspace: err: exit status 1: stderr: build flag -mod=readonly only valid
- [Solved] Executing npm install error: npm ERR! code EINTEGRITY
- NPM Install Error: npm ERR! ERESOLVE unable to resolve dependency tree
- Running the test front-end project, Google browser accesses localhost with err_SSL_PROTOCOL_ERROR
- Vue Package Error: npm ERR! missing script: build
- How to Solve Chrome Error: net::ERR_FAILED
- Browser Error: net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)
- [Solved] Vite Bulk Import import.meta.glob Error: ERR_ABORTED 403 (Forbidden)
- How to Solve Chrome error: ERR_CACHE_READ_FAILURE
- On error resume next, on error goto 0, err usage
- npm install npm ERR code ERESOLVE [How to Solve]
- [Solved] Wepy build watch Error: ERR! Parse WePY config failed. Are you trying to use