cv2 It cannot run on Android.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 18/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- android, opencv, python
- Domain
- build-system, mobile-dev
Research direction
Start by reproducing the provided Python example on Android and inspect the traceback from cv2/init.py, especially the missing config.py error. The issue is resolved when the same application can import cv2 and run without the OpenCV loader failure.
Written by the indexing model from the issue text.
Description
Software Versions
- Python: python3
- OS:Android
- Kivy: /
- Kivy installation method:
Describe the bug
A clear and concise description of what the bug is.
The issue tracker is a tool to address bugs only (search known bugs: https://git.io/vM1iE).
Please use the #support Discord channel at https://chat.kivy.org/ or Stack Overflow for
support questions, more information at https://git.io/vM1yQ.
Expected behavior
A clear and concise description of what you expected to happen.
[WARNING] stderr: Traceback (most recent call last):
[WARNING] stderr: File "/root/kivy_installer/.buildozer/android/app/main.py", line 5, in
[WARNING] stderr: File "/root/kivy_installer/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/cv2/init.py", line 181, in
[WARNING] stderr: File "/root/kivy_installer/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/cv2/init.py", line 111, in bootstrap
[WARNING] stderr: File "/root/kivy_installer/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/cv2/init.py", line 109, in load_first_config
[WARNING] stderr: ImportError: OpenCV loader: missing configuration file: ['config.py']. Check OpenCV installation.
To Reproduce
A short, runnable example that reproduces the issue with latest kivy master.
Code and Logs and screenshots
// REPLACE ME: Paste your code and logs here, a template can be found at https://git.io/vM1id.
from kivy.app import App
from kivy.uix.image import Image
from kivy.clock import Clock
from kivy.graphics.texture import Texture
import cv2
class Re_App(App):
def __init__(self):
super(Re_App, self).__init__()
self.apt = cv2.VideoCapture(0)
self.body = Image()
def build(self):
return self.body
def on_start(self):
Clock.schedule_interval(self.update, 1/30)
def update(self, dt):
is_code, image = self.apt.read()
width, height = image.shape[1], image.shape[0]
texture1 = Texture.create(size=(width, height))
texture1.blit_buffer(image.tobytes(), colorfmt='bgr')
self.body.texture = texture1
Re_App().run()
Additional context
Add any other context about the problem here.
- Dominant language
- Python
- Stars
- 8.9k
- Forks
- 2k
- Avg merge
- 12h 20m
- Merged PRs (30d)
- 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from kivy/python-for-android
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
kivy/python-for-android#3335 · 1 comment · 3 reactions ·
-
Documentation easy
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
kivy/python-for-android#3326 · 1 comment ·
-
Documentation easy Priority: Low
Difficulty 1/5 Under an hour Newbie friendliness 88/100
kivy/python-for-android#3299 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
kivy/python-for-android#3382 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
kivy/python-for-android#3381 ·
All issues in kivy/python-for-android
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
huggingface/Repo2RLEnv#163 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
NousResearch/hermes-agent#121143 ·