facebookresearch / InterHand2.6M

Official PyTorch implementation of "InterHand2.6M: A Dataset and Baseline for 3D Interacting Hand Pose Estimation from a Single RGB Image", ECCV 2020
Other
676 stars 92 forks source link

UnboundLocalError: local variable 'e' referenced before assignment #57

Open anjugopinath opened 3 years ago

anjugopinath commented 3 years ago

Pyrender version : 0.1.45 Python version (python virtual environment) : 3.8.3

I get the below error on executing "python render.py" from path 'tool/MANO_render':

Traceback (most recent call last): File "render.py", line 141, in renderer = pyrender.OffscreenRenderer(viewport_width=img_width, viewport_height=img_height, point_size=1.0) File "/s/red/a/nobackup/vision/anju/interhand_venv/lib/python3.8/site-packages/pyrender/offscreen.py", line 31, in init self._create() File "/s/red/a/nobackup/vision/anju/interhand_venv/lib/python3.8/site-packages/pyrender/offscreen.py", line 149, in _create self._platform.init_context() File "/s/red/a/nobackup/vision/anju/interhand_venv/lib/python3.8/site-packages/pyrender/platforms/pyglet_platform.py", line 62, in init_context 'internal error message was "{}"'.format(e) UnboundLocalError: local variable 'e' referenced before assignment

mks0601 commented 3 years ago

Did you run this code on ssh?

mks0601 commented 3 years ago

I added this line. Could you try again?

anjugopinath commented 3 years ago

Did you run this code on ssh?

@mks0601 , thank you very much for the quick response. No, I connected via X2Go and ran it directly on the system.

I added this line. Could you try again?

I tried this. I am getting a new error now.

(interhand_venv) earth:/s/red/a/nobackup/vision/anju/InterHand2.6M/tool/MANO_render$ python render.py WARNING: You are using a MANO model, with only 10 shape coefficients. WARNING: You are using a MANO model, with only 10 shape coefficients. Fix shapedirs bug of MANO 0%| | 0/1 [00:00<?, ?it/s]Fitting error: 4.634542 mm Fitting error: 5.285818 mm 0%| | 0/1 [00:03<?, ?it/s] Traceback (most recent call last): File "render.py", line 155, in rgb, depth = renderer.render(scene, flags=pyrender.RenderFlags.RGBA) File "/s/red/a/nobackup/vision/anju/interhand_venv/lib/python3.8/site-packages/pyrender/offscreen.py", line 86, in render self._platform.make_current() File "/s/red/a/nobackup/vision/anju/interhand_venv/lib/python3.8/site-packages/pyrender/platforms/egl.py", line 196, in make_current assert eglMakeCurrent( File "/s/red/a/nobackup/vision/anju/interhand_venv/lib/python3.8/site-packages/OpenGL/error.py", line 228, in glCheckError raise GLError( OpenGL.error.GLError: GLError( err = 12289, baseOperation = eglMakeCurrent, cArguments = ( <OpenGL._opaque.EGLDisplay_pointer object at 0x7faa72daebc0>, <OpenGL._opaque.EGLSurface_pointer object at 0x7faa75fbf9c0>, <OpenGL._opaque.EGLSurface_pointer object at 0x7faa75fbf9c0>, <OpenGL._opaque.EGLContext_pointer object at 0x7faa72daef40>, ), result = 0 )

mks0601 commented 3 years ago

I guess it is due to the X2Go.. It runs without problems on ssh connection and local system..

anjugopinath commented 3 years ago

When connected via x2go and when I type the command glxinfo | grep "OpenGL version" I get this: OpenGL version string: 1.2 (1.5 Mesa 6.4.2)

May I know what version is required please? I will try with X-forwarding over SSH

Thank You, Anju

DaBihy commented 7 months ago

Did you run this code on ssh?

@mks0601 , thank you very much for the quick response. No, I connected via X2Go and ran it directly on the system.

I added this line. Could you try again?

I tried this. I am getting a new error now.

(interhand_venv) earth:/s/red/a/nobackup/vision/anju/InterHand2.6M/tool/MANO_render$ python render.py WARNING: You are using a MANO model, with only 10 shape coefficients. WARNING: You are using a MANO model, with only 10 shape coefficients. Fix shapedirs bug of MANO 0%| | 0/1 [00:00<?, ?it/s]Fitting error: 4.634542 mm Fitting error: 5.285818 mm 0%| | 0/1 [00:03<?, ?it/s] Traceback (most recent call last): File "render.py", line 155, in rgb, depth = renderer.render(scene, flags=pyrender.RenderFlags.RGBA) File "/s/red/a/nobackup/vision/anju/interhand_venv/lib/python3.8/site-packages/pyrender/offscreen.py", line 86, in render self._platform.make_current() File "/s/red/a/nobackup/vision/anju/interhand_venv/lib/python3.8/site-packages/pyrender/platforms/egl.py", line 196, in make_current assert eglMakeCurrent( File "/s/red/a/nobackup/vision/anju/interhand_venv/lib/python3.8/site-packages/OpenGL/error.py", line 228, in glCheckError raise GLError( OpenGL.error.GLError: GLError( err = 12289, baseOperation = eglMakeCurrent, cArguments = ( <OpenGL._opaque.EGLDisplay_pointer object at 0x7faa72daebc0>, <OpenGL._opaque.EGLSurface_pointer object at 0x7faa75fbf9c0>, <OpenGL._opaque.EGLSurface_pointer object at 0x7faa75fbf9c0>, <OpenGL._opaque.EGLContext_pointer object at 0x7faa72daef40>, ), result = 0 )

Hello, I'm facing the same problem. How did you fix it. Thank you