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

misp-modules v2.4.195 importlib.import_module("cv2") fails #596

Open
github-germ opened this issue Jan 4, 2023 · 7 comments
Open

misp-modules v2.4.195 importlib.import_module("cv2") fails #596

github-germ opened this issue Jan 4, 2023 · 7 comments

Comments

@github-germ
Copy link

What can be done to prevent this error from occurring when launching misp-modules v2.4.165 with MISP v2.4.167?

ERROR:root:libGL.so.1: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/misp_modules/__init__.py", line 41, in <module>
    from .modules import *  # noqa
  File "/usr/local/lib/python3.8/site-packages/misp_modules/modules/__init__.py", line 1, in <module>
    from .expansion import *  # noqa
  File "/usr/local/lib/python3.8/site-packages/misp_modules/modules/expansion/qrcode.py", line 3, in <module>
    import cv2
  File "/usr/local/lib/python3.8/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "/usr/local/lib/python3.8/site-packages/cv2/__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
uwhois module not installed.
@github-germ
Copy link
Author

not seeing this anymore in 2.4.169

@github-germ
Copy link
Author

Seeing this again in 2.4.195...

[20240815-170828] /entrypoint.sh starting
ERROR:root:libGL.so.1: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/misp_modules/__init__.py", line 45, in <module>
    from .modules import *  # noqa
  File "/usr/local/lib/python3.8/site-packages/misp_modules/modules/__init__.py", line 1, in <module>
    from .expansion import *  # noqa
  File "/usr/local/lib/python3.8/site-packages/misp_modules/modules/expansion/qrcode.py", line 3, in <module>
    import cv2
  File "/usr/local/lib/python3.8/site-packages/cv2/__init__.py", line 181, in <module>
    bootstrap()
  File "/usr/local/lib/python3.8/site-packages/cv2/__init__.py", line 153, in bootstrap
    native_module = importlib.import_module("cv2")
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

@ostefano
Copy link
Collaborator

Try a more recent version.

@github-germ github-germ changed the title misp-modules v2.4.165 + MISP v2.4.167: uwhois module not installed misp-modules v2.4.195 importlib.import_module("cv2") fails Sep 27, 2024
@github-germ
Copy link
Author

Thx for the swift reply. 2.4.195 is pretty recent. You think this is fixed in 2.4.197?

@ostefano
Copy link
Collaborator

I have good reasons to think so

@github-germ
Copy link
Author

OK, I cannot hit 2.4.197 yet, as I have to revise my Dockerfile as <= 2.4.195 I built using REQUIREMENTS which is no longer. On my first revised attempt it built a bogus docker image. I'll get back to that over the next week or so.

@ostefano
Copy link
Collaborator

Why don't you try the official docker image? https://github.com/MISP/misp-docker

Also, you can now install misp-modules using pip: https://pypi.org/project/misp-modules/

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

2 participants