Errors appearing when running flet on Android when the flet code contains some libraries even though they are binary on https://pypi.org/ like pyzbar: #4163
Replies: 6 comments 1 reply
-
|
Beta Was this translation helpful? Give feedback.
-
I have a suggestion to modify pyzbar so that it can run zbar: I found a solution: `import platform all = ['load'] def _windows_fnames(): def _android_fnames(): def load():
Including both: libiconv.so and libzbarjni.so after downloading them from the link: https://github.com/chentao0707/ZBarAndroidSDK/tree/master/ZBarScanProjAll/libs/arm64-v8a |
Beta Was this translation helpful? Give feedback.
-
I've been stuck trying to get pyzbar to work on Android for a whole month now and I still can't. I hope packages are prioritized before anything else so that flet stands out from other tools. |
Beta Was this translation helpful? Give feedback.
-
In short: The solution is available at the following link: |
Beta Was this translation helpful? Give feedback.
-
https://pub.dev/packages/flutter_zxing |
Beta Was this translation helpful? Give feedback.
-
for pure python barcode encoding see https://github.com/xulihang/EAN13_Reader. |
Beta Was this translation helpful? Give feedback.
-
Discussed in #4158
Originally posted by YasseenAlhusammi October 14, 2024
Please add pyzbar:
The following reasons:
When converting a Fleet project using to apk using:
Version: flet==0.25.0.dev3519
and python==3.12.6:
and windows 10:
The following error appears on Android when running the application on Android despite adding pyzbar to requirements.txt, and despite the fact that
pyzbar-0.1.9-py2.py3-none-win_amd64.whl has a binary file at https://pypi.org/:
The error that appears when running the application on Android is as follows:
Traceback (most recent call last):
File "", line 43, in
File "", line 229, in run_module
File "", line 88, in _run_code
File "/data/user/0/com.flet.myapp/files/flet/app/main.py", line 4, in from pyzbar import pyzbar File "/data/user/0/com.flet.myapp/files/flet/python_site_packages/pyzbar/pyzbar.py", line 7, in from .wrapper import ( File "/data/user/0/com.flet.my app/files/flet/python_site_packages/pyzbar/wrapper.py", line 151, in zbar_version = zbar_function( ^^^^^^^^^^^^^^ File "/data/user/0/com.flet.myapp/files/flet/python_site_packages/pyzbar/wrapper.py", line 148, in zbar_function return prototype((fname, load_libzbar())) ^^^^^^^^^^^^^ File "/data/user/0/com.flet.myapp/files/flet/python_site_packages/pyzbar/wrapper.py", line 127, in load_libzbar libzbar, dependencies = zbar_library.load() ^^^^^^^^^ File "/data/user/0/com.flet.myapp/files/flet/python_site_packages/pyzbar/zbar_library.py", line 65, in load raise ImportError('Unable to find zbar shared library') ImportError: Unable to find zbar shared library
Beta Was this translation helpful? Give feedback.
All reactions