flet icon indicating copy to clipboard operation
flet copied to clipboard

The application cannot be opened because its executable is missing.

Open omid3098 opened this issue 1 year ago • 4 comments

Duplicate Check

  • [x] I have searched the opened issues and there are no duplicates

Describe the bug

Running flet app using flet run gives error: The application cannot be opened because its executable is missing.

Code sample

Code
import flet as ft


def main(page: ft.Page):
    counter = ft.Text("0", size=50, data=0)

    def increment_click(e):
        counter.data += 1
        counter.value = str(counter.data)
        counter.update()

    page.floating_action_button = ft.FloatingActionButton(
        icon=ft.Icons.ADD, on_click=increment_click
    )
    page.add(
        ft.SafeArea(
            ft.Container(
                counter,
                alignment=ft.alignment.center,
            ),
            expand=True,
        )
    )


ft.app(main)

To reproduce

followed as documentation suggested:

mkdir first-flet-app
cd first-flet-app
python3 -m venv .venv
source .venv/bin/activate

then:

pip install 'flet[all]'
flet --version
0.26.0
flet create
flet run

the output:

The application cannot be opened because its executable is missing.

Also tried with different python version and got the same results. 3.9.6 3.10.13 3.13.0

Expected behavior

to see the application window created and shown.

Screenshots / Videos

Captures

Operating System

macOS

Operating system details

macOS Sequoia 15.3 (24D60)

Flet version

0.26.0

Regression

No, it isn't

Suggestions

No response

Logs

Logs
 mkdir first-flet-app
cd first-flet-app
python3 -m venv .venv
source .venv/bin/activate
(flet-app) 
󰀵 omid3098  …/flet-app/first-flet-app   master ?   v3.10.13   16:48  
 which python
/Users/omid3098/Documents/w/Python/flet-app/first-flet-app/.venv/bin/python
(flet-app) 
󰀵 omid3098  …/flet-app/first-flet-app   master ?   v3.10.13   16:48  
 pip install 'flet[all]'
Collecting flet[all]
  Using cached flet-0.26.0-py3-none-any.whl (535 kB)
Collecting oauthlib<4.0.0,>=3.2.2
  Using cached oauthlib-3.2.2-py3-none-any.whl (151 kB)
Collecting repath<0.10.0,>=0.9.0
  Using cached repath-0.9.0-py3-none-any.whl (4.7 kB)
Collecting httpx
  Using cached httpx-0.28.1-py3-none-any.whl (73 kB)
Collecting flet-cli==0.26.0
  Using cached flet_cli-0.26.0-py3-none-any.whl (40 kB)
Collecting flet-desktop==0.26.0
  Using cached flet_desktop-0.26.0-py3-none-macosx_10_14_x86_64.whl (46.8 MB)
Collecting flet-web==0.26.0
  Using cached flet_web-0.26.0-py3-none-any.whl (3.0 MB)
Collecting toml<0.11.0,>=0.10.2
  Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting cookiecutter<3.0.0,>=2.6.0
  Using cached cookiecutter-2.6.0-py3-none-any.whl (39 kB)
Collecting packaging
  Using cached packaging-24.2-py3-none-any.whl (65 kB)
Collecting qrcode<8.0.0,>=7.4.2
  Using cached qrcode-7.4.2-py3-none-any.whl (46 kB)
Collecting watchdog<5.0.0,>=4.0.0
  Using cached watchdog-4.0.2-cp310-cp310-macosx_10_9_x86_64.whl (92 kB)
Collecting fastapi
  Using cached fastapi-0.115.8-py3-none-any.whl (94 kB)
Collecting uvicorn[standard]
  Using cached uvicorn-0.34.0-py3-none-any.whl (62 kB)
Collecting six>=1.9.0
  Using cached six-1.17.0-py2.py3-none-any.whl (11 kB)
Collecting certifi
  Using cached certifi-2025.1.31-py3-none-any.whl (166 kB)
Collecting httpcore==1.*
  Using cached httpcore-1.0.7-py3-none-any.whl (78 kB)
Collecting idna
  Using cached idna-3.10-py3-none-any.whl (70 kB)
Collecting anyio
  Using cached anyio-4.8.0-py3-none-any.whl (96 kB)
Collecting h11<0.15,>=0.13
  Using cached h11-0.14.0-py3-none-any.whl (58 kB)
Collecting requests>=2.23.0
  Using cached requests-2.32.3-py3-none-any.whl (64 kB)
Collecting rich
  Using cached rich-13.9.4-py3-none-any.whl (242 kB)
Collecting arrow
  Using cached arrow-1.3.0-py3-none-any.whl (66 kB)
Collecting binaryornot>=0.4.4
  Using cached binaryornot-0.4.4-py2.py3-none-any.whl (9.0 kB)
Collecting Jinja2<4.0.0,>=2.7
  Using cached jinja2-3.1.5-py3-none-any.whl (134 kB)
Collecting pyyaml>=5.3.1
  Using cached PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl (184 kB)
Collecting python-slugify>=4.0.0
  Using cached python_slugify-8.0.4-py2.py3-none-any.whl (10 kB)
Collecting click<9.0.0,>=7.0
  Using cached click-8.1.8-py3-none-any.whl (98 kB)
Collecting typing-extensions
  Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Collecting pypng
  Using cached pypng-0.20220715.0-py3-none-any.whl (58 kB)
Collecting sniffio>=1.1
  Using cached sniffio-1.3.1-py3-none-any.whl (10 kB)
Collecting exceptiongroup>=1.0.2
  Using cached exceptiongroup-1.2.2-py3-none-any.whl (16 kB)
Collecting pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4
  Using cached pydantic-2.10.6-py3-none-any.whl (431 kB)
Collecting starlette<0.46.0,>=0.40.0
  Using cached starlette-0.45.3-py3-none-any.whl (71 kB)
Collecting watchfiles>=0.13
  Using cached watchfiles-1.0.4-cp310-cp310-macosx_10_12_x86_64.whl (395 kB)
Collecting uvloop!=0.15.0,!=0.15.1,>=0.14.0
  Using cached uvloop-0.21.0-cp310-cp310-macosx_10_9_x86_64.whl (801 kB)
Collecting httptools>=0.6.3
  Using cached httptools-0.6.4-cp310-cp310-macosx_10_9_universal2.whl (198 kB)
Collecting python-dotenv>=0.13
  Using cached python_dotenv-1.0.1-py3-none-any.whl (19 kB)
Collecting websockets>=10.4
  Using cached websockets-14.2-cp310-cp310-macosx_10_9_x86_64.whl (160 kB)
Collecting chardet>=3.0.2
  Using cached chardet-5.2.0-py3-none-any.whl (199 kB)
Collecting MarkupSafe>=2.0
  Using cached MarkupSafe-3.0.2-cp310-cp310-macosx_10_9_universal2.whl (14 kB)
Collecting annotated-types>=0.6.0
  Using cached annotated_types-0.7.0-py3-none-any.whl (13 kB)
Collecting pydantic-core==2.27.2
  Using cached pydantic_core-2.27.2-cp310-cp310-macosx_10_12_x86_64.whl (1.9 MB)
Collecting text-unidecode>=1.3
  Using cached text_unidecode-1.3-py2.py3-none-any.whl (78 kB)
Collecting urllib3<3,>=1.21.1
  Using cached urllib3-2.3.0-py3-none-any.whl (128 kB)
Collecting charset-normalizer<4,>=2
  Using cached charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl (198 kB)
Collecting python-dateutil>=2.7.0
  Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
Collecting types-python-dateutil>=2.8.10
  Using cached types_python_dateutil-2.9.0.20241206-py3-none-any.whl (14 kB)
Collecting markdown-it-py>=2.2.0
  Using cached markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
Collecting pygments<3.0.0,>=2.13.0
  Using cached pygments-2.19.1-py3-none-any.whl (1.2 MB)
Collecting mdurl~=0.1
  Using cached mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Installing collected packages: text-unidecode, pypng, websockets, watchdog, uvloop, urllib3, typing-extensions, types-python-dateutil, toml, sniffio, six, pyyaml, python-slugify, python-dotenv, pygments, packaging, oauthlib, mdurl, MarkupSafe, idna, httptools, h11, exceptiongroup, click, charset-normalizer, chardet, certifi, annotated-types, uvicorn, requests, repath, qrcode, python-dateutil, pydantic-core, markdown-it-py, Jinja2, httpcore, binaryornot, anyio, watchfiles, starlette, rich, pydantic, httpx, arrow, flet, fastapi, cookiecutter, flet-web, flet-desktop, flet-cli
Successfully installed Jinja2-3.1.5 MarkupSafe-3.0.2 annotated-types-0.7.0 anyio-4.8.0 arrow-1.3.0 binaryornot-0.4.4 certifi-2025.1.31 chardet-5.2.0 charset-normalizer-3.4.1 click-8.1.8 cookiecutter-2.6.0 exceptiongroup-1.2.2 fastapi-0.115.8 flet-0.26.0 flet-cli-0.26.0 flet-desktop-0.26.0 flet-web-0.26.0 h11-0.14.0 httpcore-1.0.7 httptools-0.6.4 httpx-0.28.1 idna-3.10 markdown-it-py-3.0.0 mdurl-0.1.2 oauthlib-3.2.2 packaging-24.2 pydantic-2.10.6 pydantic-core-2.27.2 pygments-2.19.1 pypng-0.20220715.0 python-dateutil-2.9.0.post0 python-dotenv-1.0.1 python-slugify-8.0.4 pyyaml-6.0.2 qrcode-7.4.2 repath-0.9.0 requests-2.32.3 rich-13.9.4 six-1.17.0 sniffio-1.3.1 starlette-0.45.3 text-unidecode-1.3 toml-0.10.2 types-python-dateutil-2.9.0.20241206 typing-extensions-4.12.2 urllib3-2.3.0 uvicorn-0.34.0 uvloop-0.21.0 watchdog-4.0.2 watchfiles-1.0.4 websockets-14.2

[notice] A new release of pip is available: 23.0.1 -> 25.0
[notice] To update, run: pip install --upgrade pip
(flet-app) 
󰀵 omid3098  …/flet-app/first-flet-app   master ?   v3.10.13   16:49  
 flet --version
0.26.0
(flet-app) 
󰀵 omid3098  …/flet-app/first-flet-app   master ?   v3.10.13   16:49  
 flet create
The app has been created.

Run the app:

flet run 

(flet-app) 
󰀵 omid3098  …/flet-app/first-flet-app   master ?   v3.10.13   16:49  
 flet run
The application cannot be opened because its executable is missing.
(flet-app) 
󰀵 omid3098  …/flet-app/first-flet-app   master ?   v3.10.13   16:49  

Additional details

No response

omid3098 avatar Feb 08 '25 15:02 omid3098

Check for the flet-core folder and its files in the site packages folder of your venv

HappyCoder256 avatar Feb 09 '25 12:02 HappyCoder256

Do you have Flet client app unpacked in ~/.flet/bin/flet-0.26.0? Check if indeed executable exists at ~/.flet/bin/flet-0.26.0/Flet.app/Contents/MacOS/Flet?

I don't know what would be the reason of its absence - maybe some antivirus software or other service on your machine preventing/blocking it.

FeodorFitsner avatar Feb 10 '25 16:02 FeodorFitsner

It was not there for some reason! After doing:

pip uninstall flet
pip cache purge

And re-doing all above steps, the issue is fixed. Thank you.

omid3098 avatar Feb 12 '25 21:02 omid3098

I had the same issue. I additionally had to remove the ~/.flet directory and do a clean reinstall in order to fix it. Specifically:

pip uninstall 'flet[all]'
pip cache purge
rm -r ~/.flet
pip install 'flat[all]'

stangelid avatar May 02 '25 14:05 stangelid