Closed GraceJary closed 4 years ago
Hi, 1.) Did you change PyOpenGL according to https://github.com/mcfletch/pyopengl/issues/27? 2.) The -d option attempts to open a window for debugging purposes. Is it working without -d?
I changed the egl.py like this:
"""EGL (cross-platform) platform library"""
import ctypes, ctypes.util
from OpenGL.platform import baseplatform, ctypesloader
class EGLPlatform( baseplatform.BasePlatform ):
try:
return ctypesloader.loadLibrary(
ctypes.cdll,
'OpenGL',
mode=ctypes.RTLD_GLOBAL
)
except OSError:
Okay, good. But if you don't have a display connected, you can't run the code in debugging mode, i.e. with the -d flag. This is also mentioned in the README. Does it run without the flag?
I assume it does, closing the issue for now.
I came upon the same issue, I changed my code to be like in the comment above yet still it doesn't work and nothing changed.
using egl 0% | | 0 / 20000 ETA: --:--:-- libEGL warning: DRI2: failed to authenticate Traceback (most recent call last): File "/home/ros/.local/bin/ae_train", line 11, in <module> load_entry_point('auto-pose==0.9', 'console_scripts', 'ae_train')() File "/home/ros/.local/lib/python2.7/site-packages/auto_pose/ae/ae_train.py", line 87, in main dataset.get_training_images(dataset_path, args) File "/home/ros/.local/lib/python2.7/site-packages/auto_pose/ae/dataset.py", line 92, in get_training_images self.render_training_images() File "/home/ros/.local/lib/python2.7/site-packages/auto_pose/ae/dataset.py", line 244, in render_training_images bgr_x, depth_x = self.renderer.render( File "/home/ros/.local/lib/python2.7/site-packages/auto_pose/ae/utils.py", line 15, in decorator setattr(self, attribute, function(self)) File "/home/ros/.local/lib/python2.7/site-packages/auto_pose/ae/dataset.py", line 75, in renderer float(self._kw['vertex_scale']) File "/home/ros/.local/lib/python2.7/site-packages/auto_pose/meshrenderer/meshrenderer_phong.py", line 18, in __init__ self._context = gu.OffscreenContext() File "/home/ros/.local/lib/python2.7/site-packages/auto_pose/meshrenderer/gl_utils/egl_offscreen_context.py", line 74, in __init__ EGL_NO_CONTEXT, context_attributes File "/home/ros/.local/lib/python2.7/site-packages/OpenGL/platform/baseplatform.py", line 409, in __call__ return self( *args, **named ) File "src/errorchecker.pyx", line 53, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError OpenGL.error.GLError: GLError( err = 12297, baseOperation = eglCreateContext, cArguments = ( <OpenGL._opaque.EGLDisplay_pointer object at 0x7f1f05e19ef0>, <OpenGL._opaque.EGLConfig_pointer object at 0x7f1f05e19e60>, <OpenGL._opaque.EGLContext_pointer object at 0x7f1f05e190e0>, <OpenGL.arrays.lists.c_int_Array_7 object at 0x7f1f05915050>, ), result = <OpenGL._opaque.EGLContext_pointer object at 0x7f1f05915320> )
I'm using OpenGL version 4.6.0
I came upon the same issue, I changed my code to be like in the comment above yet still it doesn't work and nothing changed.
using egl 0% | | 0 / 20000 ETA: --:--:-- libEGL warning: DRI2: failed to authenticate Traceback (most recent call last): File "/home/ros/.local/bin/ae_train", line 11, in <module> load_entry_point('auto-pose==0.9', 'console_scripts', 'ae_train')() File "/home/ros/.local/lib/python2.7/site-packages/auto_pose/ae/ae_train.py", line 87, in main dataset.get_training_images(dataset_path, args) File "/home/ros/.local/lib/python2.7/site-packages/auto_pose/ae/dataset.py", line 92, in get_training_images self.render_training_images() File "/home/ros/.local/lib/python2.7/site-packages/auto_pose/ae/dataset.py", line 244, in render_training_images bgr_x, depth_x = self.renderer.render( File "/home/ros/.local/lib/python2.7/site-packages/auto_pose/ae/utils.py", line 15, in decorator setattr(self, attribute, function(self)) File "/home/ros/.local/lib/python2.7/site-packages/auto_pose/ae/dataset.py", line 75, in renderer float(self._kw['vertex_scale']) File "/home/ros/.local/lib/python2.7/site-packages/auto_pose/meshrenderer/meshrenderer_phong.py", line 18, in __init__ self._context = gu.OffscreenContext() File "/home/ros/.local/lib/python2.7/site-packages/auto_pose/meshrenderer/gl_utils/egl_offscreen_context.py", line 74, in __init__ EGL_NO_CONTEXT, context_attributes File "/home/ros/.local/lib/python2.7/site-packages/OpenGL/platform/baseplatform.py", line 409, in __call__ return self( *args, **named ) File "src/errorchecker.pyx", line 53, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError OpenGL.error.GLError: GLError( err = 12297, baseOperation = eglCreateContext, cArguments = ( <OpenGL._opaque.EGLDisplay_pointer object at 0x7f1f05e19ef0>, <OpenGL._opaque.EGLConfig_pointer object at 0x7f1f05e19e60>, <OpenGL._opaque.EGLContext_pointer object at 0x7f1f05e190e0>, <OpenGL.arrays.lists.c_int_Array_7 object at 0x7f1f05915050>, ), result = <OpenGL._opaque.EGLContext_pointer object at 0x7f1f05915320> )
I'm using OpenGL version 4.6.0
Hey I have similar issues , did you manage to fix these errors ?
Hey @B-Acharya , I am facing the same issue as you mentioned above. Did you manage to resolve it ?
run 'export PYOPENGL_PLATFORM='egl'', and then run "ae_train exp_group/my_autoencoder -d" but it occured to have this error: OpenGL.error.GLError: GLError( err = 12297, baseOperation = eglCreateContext, cArguments = ( <OpenGL._opaque.EGLDisplay_pointer object at 0x7fec2fd053b0>, <OpenGL._opaque.EGLConfig_pointer object at 0x7fec2fd05320>, <OpenGL._opaque.EGLContext_pointer object at 0x7fec2fdc5560>, <OpenGL.arrays.lists.c_int_Array_7 object at 0x7fec2fd054d0>, ), result = <OpenGL._opaque.EGLContext_pointer object at 0x7fec2fd057a0> )