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

opencv package with 4.9.0.80 version problem #1148

Closed
YenYunn opened this issue May 2, 2024 · 1 comment
Closed

opencv package with 4.9.0.80 version problem #1148

YenYunn opened this issue May 2, 2024 · 1 comment

Comments

@YenYunn
Copy link

YenYunn commented May 2, 2024

Hello, I'm attempting to use Chaquopy on Android with the following setup in my build.gradle:
pip { install "numpy" install "opencv-python==4.9.0.80" }

However, when I specify the version of OpenCV, I encounter the following error:

com.chaquo.python.PyException: ImportError: OpenCV loader: missing configuration file: ['config.py']. Check OpenCV installation.

If I don't specify a version and simply use install "opencv-python", the program crashes when executing cv2.dnn.NMSBoxes with this error:

OpenCV(4.5.1) Error: Assertion failed (channels() == CV_MAT_CN(dtype)) in copyTo, file /home/smith/git/chaquo/python/server/pypi/packages/opencv-python/build/4.5.1.48/cp38-cp38-android_21_x86_64/src/opencv/modules/core/src/copy.cpp, line 254
2024-05-02 16:52:14.068 9913-9913 libc++abi com.example.myapp E terminating with uncaught exception of type cv::Exception: OpenCV(4.5.1) /home/smith/git/chaquo/python/server/pypi/packages/opencv-python/build/4.5.1.48/cp38-cp38-android_21_x86_64/src/opencv/modules/core/src/copy.cpp:254: error: (-215:Assertion failed) channels() == CV_MAT_CN(dtype) in function 'copyTo'

Could you help me resolve these issues?

@mhsmith
Copy link
Member

mhsmith commented May 2, 2024

OpenCV 4.5.1.48 is currently the newest version in the repository. So when you asked for version 4.9.0.80, your app shouldn't even have been able to build. To be notified when we add a newer version, please subscribe to #620.

However, searching for this assertion message on Google indicates that it may be caused by a bug in your own code, in which case upgrading the version wouldn't help. I don't know enough about OpenCV to be more specific, so I suggest you try searching for the message yourself.

@mhsmith mhsmith closed this as completed May 2, 2024
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