MISP / MISP/misp-modules

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

Open
#596 17 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
377
Forks
280
Avg merge
2d 2h
Merged PRs (30d)
10

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the launch failure with MISP v2.4.167 and misp-modules v2.4.165, then inspect misp_modules/modules/expansion/qrcode.py and the imports in misp_modules/init.py and modules/init.py. Determine how the missing libGL.so.1 affects cv2 loading; done means module startup no longer aborts at importlib.import_module("cv2").

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.