FS#60855 - [opencv] Upgrade to 3.4.4-1 breaks import of binary modules in python (recursion error)

Attached to Project: Arch Linux
Opened by Shawn Nock (nocko) - Sunday, 18 November 2018, 15:59 GMT
Last edited by Antonio Rojas (arojas) - Wednesday, 21 November 2018, 22:15 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Antonio Rojas (arojas)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 8
Private No

Details

Description:

Upon upgrading to 3.4.4-1, a new error appears when attemping to "import cv2" in Python (3.7.1):

Traceback (most recent call last):
File "main.py", line 1, in <module>
import cv2
File "/usr/lib/python3.7/site-packages/cv2/__init__.py", line 89, in <module>
bootstrap()
File "/usr/lib/python3.7/site-packages/cv2/__init__.py", line 79, in bootstrap
import cv2
File "/usr/lib/python3.7/site-packages/cv2/__init__.py", line 89, in <module>
bootstrap()
File "/usr/lib/python3.7/site-packages/cv2/__init__.py", line 23, in bootstrap
raise ImportError('ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation.')
ImportError: ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation.

Marking as high severity, it doesn't seem like any programs using python wrapper for OpenCV can run until this is resolved.

Additional info:

Reverting to 3.4.3-5 resolves the issue.


Steps to reproduce:
*Update to 3.4.4-1
*python -c "import cv2"

This task depends upon

Closed by  Antonio Rojas (arojas)
Wednesday, 21 November 2018, 22:15 GMT
Reason for closing:  Fixed
Additional comments about closing:  opencv 4.0.0-4
Comment by Wentao Lyu (eastpiger) - Sunday, 18 November 2018, 16:24 GMT
same issue with me. "ImportError: ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation."

BTW, package opencv 4.0.0-2 in staging also has this issue.

I noticed these code in /usr/lib/python3.7/site-packages/cv2/config-3.7.py, it may help.

PYTHON_EXTENSIONS_PATHS = [
'/build/opencv/src/build/lib/python3'
] + PYTHON_EXTENSIONS_PATHS
Comment by Mat Wegmann (Kanehekili) - Sunday, 18 November 2018, 17:30 GMT
Same issue here. trunk can be compiled with python3 & ffmpeg without issues.
Reverting to opencv 3.4.3-5 solves the issue
Comment by wangqr (wangqr) - Monday, 19 November 2018, 19:39 GMT

Loading...