Closed R0w0m closed 1 year ago
Seconded. I am using the examples provided, even they don't work. I am also using Linux (ubuntu).
[UPDATE] It is a permissioning issue. When I try in a root env it works.
I can confirm. Running the examples as Ubuntu native app, none of the functions pick_files(), save_file() or get_directory_path() open the native file explorer (Nautilus on Ubuntu) unless I run the python executable with sudo privileges.
I cannot imagine this is intentional. Anyone found a solution? This is currently a showstopper for my app.
Ubuntu 22.04
Name: flet
Version: 0.8.2
Summary: Flet for Python - easily build interactive multi-platform apps in Python
Home-page:
Author: Appveyor Systems Inc.
Author-email: hello@flet.dev
License: Apache-2.0
Location: /home/roald/KMM/stillOnWheels/stowImporter/env/lib/python3.10/site-packages
Requires: copier, flet-runtime, packaging, pydantic, qrcode, watchdog, websocket-client, websockets
Required-by:
UPDATE to my previous comment:
Apparently I was a little bit too hasty... What I have discovered is that the above is true when running the script from VS Code, but not if running the script from Ubuntu terminal (x-terminal-emulator). Trying to find what's going on I came across this setting in VS Code: terminal.integrated.inheritEnv
. Setting this to false makes file explorer launch as expected with all 3 above mentioned methods. (Still I have the issue if running debug in VS Code, but I assume it is related).
@R0w0m / @BedirT - any comments on this? Maybe the same is true for you?
Another UPDATE for the possible benefit of future googlers: Comparing the environments where 1) FilePicker launches the file explorer vs 2) where FilePicker needs root-privileges to open file explorer
reveals that env var GTK_PATH=/snap/code/134/usr/lib/x86_64-linux-gnu/gtk-3.0 was set in case 2. Unseting this variable solves the problem for me.
The following links may be relevant:
Great discovery, thanks for sharing it!
Description
When I click on the filepicker button, nothing happens. I tried the examples from the documentation and they don't work either. Maybe some libraries need to be installed. I am running in a virtual environment.
Code example to reproduce the issue:
and also this one
Describe the results i received:
Nothing happens when I press it. It's like they're just normal buttons with no functionality. Also no message is displayed even in the terminal
Additional information:
I tried to run it in web, only pick_files works. Pick_dir and save_file don't work as well. In windows it works correctly
Flet version (
pip show flet
):Operating system:
Arch Linux. kernel: 6.3.9
Additional environment details: DE: Gnome 44.2
Please help me, I have no idea why this is happening.