flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
11.18k stars 430 forks source link

flet buil macos succeed but show error when open the app #3859

Open datle021194 opened 1 month ago

datle021194 commented 1 month ago

Duplicate Check

Describe the bug

I'm building a Flet MacOS app. flet run command is ok, my app work as expected. I tried to build the app with flet build macos command, it succeed but when I opened the app then the app show this error:

Traceback (most recent call last): File "", line 43, in File "", line 229, in run_module File "", line 88, in _run_code File "/var/folders/f3/k07jx8zd2832zhxxr2pbm5_00000gn/T/serious_python_tempwF5CIT/main.py", line 2, in File "/var/folders/f3/k07jx8zd2832zhxxr2pbm5_00000gn/T/serious_python_tempwF5CIT/source/presentation/scenes/scene_coordinator.py", line 5, in File "/var/folders/f3/k07jx8zd2832zhxxr2pbm5_00000gn/T/serious_python_tempwF5CIT/source/presentation/scenes/home/ui.py", line 4, in File "/var/folders/f3/k07jx8zd2832zhxxr2pbm5_00000gn/T/serious_python_tempwF5CIT/source/presentation/scenes/home/controller.py", line 2, in File "/var/folders/f3/k07jx8zd2832zhxxr2pbm5_00000gn/T/serious_python_tempwF5CIT/source/libraries/image_manager/init.py", line 1, in File "/var/folders/f3/k07jx8zd2832zhxxr2pbm5_00000gn/T/serious_python_tempwF5CIT/pypackages/rembg/init.py", line 5, in File "/var/folders/f3/k07jx8zd2832zhxxr2pbm5_00000gn/T/serious_python_tempwF5CIT/pypackages/rembg/bg.py", line 7, in File "/var/folders/f3/k07jx8zd2832zhxxr2pbm5_00000gn/T/serious_python_tempwF5CIT/pypackages/cv2/init.py", line 181, in File "/var/folders/f3/k07jx8zd2832zhxxr2pbm5_00000gn/T/serious_python_tempwF5CIT/pypackages/cv2/init.py", line 111, in bootstrap File "/var/folders/f3/k07jx8zd2832zhxxr2pbm5_00000gn/T/serious_python_tempwF5CIT/pypackages/cv2/init.py", line 109, in load_first_config ImportError: OpenCV loader: missing configuration file: ['config.py']. Check OpenCV installation.

requirements.txt:

flet flet-core flet-runtime pillow posthog rembg

I checked this same issue in the issues list but it's on window and my build folder didn't have an app.zip file. I also tried to remove the .venv and created a new one to reinstall all dependencies but still error.

Code sample

Code ```python [Paste your code here] ```

To reproduce

.

Expected behavior

No response

Screenshots / Videos

Captures [Upload media here]

Operating System

macOS

Operating system details

Sonoma 14.4

Flet version

0.23.2

Regression

No, it isn't

Suggestions

No response

Logs

Logs ```console [Paste your logs here] ```

Additional details

No response

datle021194 commented 1 month ago

Please give me any help