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

ImportError: ('Unable to load EGL library', 22, '找不到指定的模块。', None, 126, None, 'EGL', None) #8

Open
Archives-RZ opened this issue Aug 10, 2023 · 7 comments

Comments

@Archives-RZ
Copy link

Hi, I was interested in your model, so I tried to run your demo.py. I configured the environment according to the readme file given and encountered the following error when running the demo.py file.

Traceback (most recent call last):
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\OpenGL\platform\egl.py", line 70, in EGL
mode=ctypes.RTLD_GLOBAL
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\OpenGL\platform\ctypesloader.py", line 45, in loadLibrary
return dllType( name, mode )
File "C:\Users\meruijingz.conda\envs\glot\lib\ctypes_init_.py", line 364, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] 找不到指定的模块。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "demo.py", line 38, in
from lib.utils.renderer import Renderer
File "D:\GLoT\lib\utils\renderer.py", line 5, in
import pyrender
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\pyrender_init_.py", line 3, in
from .light import Light, PointLight, DirectionalLight, SpotLight
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\pyrender\light.py", line 11, in
from .texture import Texture
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\pyrender\texture.py", line 8, in
from OpenGL.GL import *
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\OpenGL\GL_init_.py", line 3, in
from OpenGL import error as _error
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\OpenGL\error.py", line 12, in
from OpenGL import platform, configflags
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\OpenGL\platform_init
.py", line 35, in
load()
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\OpenGL\platform_init
.py", line 32, in _load
plugin.install(globals())
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\OpenGL\platform\baseplatform.py", line 92, in install
namespace[ name ] = getattr(self,name,None)
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\OpenGL\platform\baseplatform.py", line 14, in get
value = self.fget( obj )
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\OpenGL\platform\egl.py", line 93, in GetCurrentContext
return self.EGL.eglGetCurrentContext
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\OpenGL\platform\baseplatform.py", line 14, in get
value = self.fget( obj )
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\OpenGL\platform\egl.py", line 73, in EGL
raise ImportError("Unable to load EGL library", *err.args)
ImportError: ('Unable to load EGL library', 22, '找不到指定的模块。', None, 126, None, 'EGL', None)

I tried commenting the line os.environ['PYOPENGL_PLATFORM'] = 'egl', but nothing changed, I still got this error. I want to know how to fix this problem.

@sxl142
Copy link
Owner

sxl142 commented Aug 10, 2023

mkocabas/VIBE#101

@sxl142
Copy link
Owner

sxl142 commented Aug 10, 2023

@Archives-RZ
Copy link
Author

mkocabas/VIBE#101

I feel sad, this solution is no useful for me, none of the bugs have been changed.

@Archives-RZ
Copy link
Author

hongsukchoi/TCMR_RELEASE#7

Hi, I tried to use this method, unfortunately it still doesn't work. But I used other method to solve this problem.
I added "from OpenGL import platform, _configflags" in the demo.py, I solved this problem.
However, I met another problem.

Running "ffmpeg -i D:/GLoT/test.MP4 -r 30000/1001 -f image2 -v error /tmp\test_MP4/%06d.jpg"
Images saved to "/tmp\test_MP4"
Input video number of frames 3141

Downloading files from https://pjreddie.com/media/files/yolov3.weights
Traceback (most recent call last):
File "demo.py", line 385, in
main(args, cfgs)
File "demo.py", line 81, in main
yolo_img_size=args.yolo_img_size,
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\multi_person_tracker\mpt.py", line 53, in init
device=self.device, img_size=yolo_img_size, person_detector=True, video=True, return_dict=True
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\yolov3\yolo.py", line 32, in init
download_url(url, outdir)
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\yolov3\yolo.py", line 11, in download_url
subprocess.call(cmd)
File "C:\Users\meruijingz.conda\envs\glot\lib\subprocess.py", line 339, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Users\meruijingz.conda\envs\glot\lib\subprocess.py", line 800, in init
restore_signals, start_new_session)
File "C:\Users\meruijingz.conda\envs\glot\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 系统找不到指定的文件。

To fix this problem, I found the subprocess.py, then searched class Popen, changed the shell from False to True. Using this method, I fixed this bug, but now I meet a new problem.

(glot) D:\GLoT>python demo.py --vid_file D:/GLoT/test.MP4 --gpu 0 --cfg ./configs/repr_table1_3dpw.yaml
Running "ffmpeg -i D:/GLoT/test.MP4 -r 30000/1001 -f image2 -v error /tmp\test_MP4/%06d.jpg"
Images saved to "/tmp\test_MP4"
Input video number of frames 3141

Downloading files from https://pjreddie.com/media/files/yolov3.weights
'wget' is not recognized as an internal or external command,
operable program or batch file.
Downloading files from https://github.com/mkocabas/yolov3-pytorch/master/yolov3/config/yolov3.cfg
'wget' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "demo.py", line 385, in
main(args, cfgs)
File "demo.py", line 81, in main
yolo_img_size=args.yolo_img_size,
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\multi_person_tracker\mpt.py", line 53, in init
device=self.device, img_size=yolo_img_size, person_detector=True, video=True, return_dict=True
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\yolov3\yolo.py", line 51, in init
self.model = Darknet(model_def, img_size=img_size).to(device)
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\yolov3\models.py", line 239, in init
self.module_defs = parse_model_config(config_path)
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\yolov3\utils\parse_config.py", line 5, in parse_model_config
file = open(path, 'r')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\meruijingz\.torch/config/yolov3.cfg'

Actually, I didn't find the yolov3.cfg file in the specified folder, I want to know the reason.

@Archives-RZ
Copy link
Author

Hi, I think the above problem is due to the additional installation of wget in the windows environment. I solved the above problem by placing yolov3.cfg and yolov3.weights in the specified location by downloading additionally. Perhaps you should mention this in the ReadMe file for Windows users?

Running "ffmpeg -i D:/GLoT/test.MP4 -r 30000/1001 -f image2 -v error /tmp\test_MP4/%06d.jpg"
Images saved to "/tmp\test_MP4"
Input video number of frames 3141

Running Multi-Person-Tracker
0%| | 0/262 [02:01<?, ?it/s]
Traceback (most recent call last):
File "demo.py", line 385, in
main(args, cfgs)
File "demo.py", line 83, in main
tracking_results = mot(image_folder)
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\multi_person_tracker\mpt.py", line 284, in call
trackers = self.run_tracker(dataloader)
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\torch\autograd\grad_mode.py", line 49, in decorate_no_grad
return func(*args, **kwargs)
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\multi_person_tracker\mpt.py", line 78, in run_tracker
predictions = self.detector(batch)
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\torch\autograd\grad_mode.py", line 49, in decorate_no_grad
return func(*args, **kwargs)
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\yolov3\yolo.py", line 70, in call
detections = self.model(inp_batch)
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\torch\nn\modules\module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\yolov3\models.py", line 252, in forward
x = module(x)
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\torch\nn\modules\module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\torch\nn\modules\container.py", line 100, in forward
input = module(input)
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\torch\nn\modules\module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\torch\nn\modules\conv.py", line 345, in forward
return self.conv2d_forward(input, self.weight)
File "C:\Users\meruijingz.conda\envs\glot\lib\site-packages\torch\nn\modules\conv.py", line 342, in conv2d_forward
self.padding, self.dilation, self.groups)
RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED

Now I have a new problem. I installed the corresponding versions of cuda and pytorch according to the configuration requirements, but this error occurred. Then I installed the corresponding cudnn version, but the same error still occurs. I want to ask you for help. Thank you!

@MrLi333
Copy link

MrLi333 commented Oct 30, 2023

嗨,我认为上述问题是由于在 Windows 环境中额外安装了 wget。我通过另外下载将 yolov3.cfg 和 yolov3.weights 放在指定位置解决了上述问题。也许您应该在 Windows 用户的自述文件中提及这一点?

运行“ffmpeg -i D:/GLoT/test.MP4 -r 30000/1001 -f image2 -v error /tmp\test_MP4/%06d.jpg” 图像保存到“/tmp\test_MP4” 输入视频帧数 3141

运行多人跟踪器 0%| |0/262 [02:01<?, ?it/s] 回溯(最近一次调用最后一次): 文件“demo.py”,第 385 行,在 main(args, cfgs) 中 文件“demo.py”,第 83 行,主tracking_results = mot(image_folder) 文件“C:\Users\meruijingz.conda\envs\glot\lib\site-packages\multi_person_tracker\mpt.py”,第 284 行,呼叫跟踪器中 = self.run_tracker(dataloader)文件“C:\Users\meruijingz.conda\envs\glot\lib\site-packages\torch\autograd\grad_mode.py”,第 49 行,在decorate_no_grad返回 func(*args, **kwargs) 文件“C:\Users\meruijingz.conda\envs\glot\lib\site-packages\multi_person_tracker\mpt.py”,第 78 行,在run_tracker预测中 = self.detector(batch) 文件“C:\Users\meruijingz.conda\envs\glot\lib\site-packages\torch\autograd\grad_mode.py”,第 49 行, 在 decorate_no_grad 中返回 func(*args, **kwargs) 文件“C:\Users\meruijingz.conda\envs\glot\lib\site-packages\yolov3\yolo.py”,第 70 行,在调用检测中 = self.model(inp_batch) 文件“C:\Users\meruijingz.conda\envs\glot\lib\site-packages\torch\nn\modules\module.py”,第 532 行,在调用结果中 = self.forward(*input, **kwargs)文件“C:\Users\meruijingz.conda\envs\glot\lib\site-packages\yolov3\models.py”,第 252 行,转发 x = module(x) 文件“C:\Users\meruijingz.conda\envs\glot\lib\site-packages\torch\nn\modules\module.py”,调用结果 = self.forward(*input, **kwargs) 文件“C:\Users\meruijingz.conda\envs\glot\lib\site-packages\torch\nn\modules\container.py”,第 532 行,转发输入 = module(input)文件“C:\Users\meruijingz.conda\envs\glot\lib\site-packages\torch\nn\modules\module.py”,第 100 行,调用结果 = self.forward(*input, **kwargs) 文件“C:\Users\meruijingz.conda\envs\glot\lib\site-packages\torch\nn\modules\conv.py”,第 532 行,在前向返回self.conv345d_forward(input, self.weight) 文件“C:\Users\meruijingz.conda\envs\glot\lib\site-packages\torch\nn\modules\conv.py”,行2,在 conv342d_forward self.padding、self.dilation、self.groups) RuntimeError:cuDNN 错误:CUDNN_STATUS_EXECUTION_FAILED

现在我有一个新问题。我根据配置要求安装了相应版本的 cuda 和 pytorch,但发生了这个错误。然后我安装了相应的cudnn版本,但仍然出现相同的错误。我想向你寻求帮助。谢谢!

Hii, I solved the problem according to your method, and there was no cudnn error, but no gpu was used, did you successfully run the demo?

@tcece
Copy link

tcece commented Sep 27, 2024

It may also be a problem with the ubantu version, I have encountered a similar problem before, the 18 version is not very good, and the version above 20 can solve the bug.

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

4 participants