When running hello world app locally, I get following error on Python/3.11.4
gio: http://localhost:8501: Operation not supported
Tried installing xdg-utils
but still the app does not launch n browser automatically.
What am I missing
When running hello world app locally, I get following error on Python/3.11.4
gio: http://localhost:8501: Operation not supported
Tried installing xdg-utils
but still the app does not launch n browser automatically.
What am I missing
Please can you give your system details? What device and OS are you using? Can you confirm the code you passed to streamlit run
? Also, can you confirm if the happens in a clean Python environment with only Streamlit (and its dependencies) installed?
OS: Ubuntu on WSL
Python: 3.11.10
Streamlit: 1.39.0
NOTE: Its working fine on Python Version 3.10, issue is with 3.11 and 3.12
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy
$ streamlit --version
Streamlit, version 1.39.0
$ python3 --version
Python 3.11.10
$ streamlit run tmp.py
You can now view your Streamlit app in your browser.
Local URL: http://localhost:8502
Network URL: http://172.22.49.192:8502
gio: http://localhost:8502: Operation not supported
I found another post about the same issue, but without a clear resolution (other than maybe rolling back to Python 3.10). I’ve put out a question internally.
I got a reply from one of our engineers:
I have found this GitHub thread in a different repository mentioning Streamlit with a potential solution: For what is GIO used? · Issue #7 · vndee/local-assistant-examples · GitHub
According to it, it sounds like an issue with WSL itself and the fact that Streamlit tries to automatically open the browser. The comment offers a potential alternative installingxdg-utils
in order to leveragexdg-open
instead ofgio open
. Other than that it sounds you can ignore the issue and just open the app manually in the browser.
I have already tried that, and you can see my reply there For what is GIO used? · Issue #7 · vndee/local-assistant-examples · GitHub
It is not a solution.
I am opening the browser manually for now.
Installing wslu
on WSL solved the issue.
simply
sudo apt-get install wslu
or below if above does not work
sudo add-apt-repository ppa:wslutilities/wslu
sudo apt update
sudo apt install wslu
The issue apparently is WSL trying to open WSL browser instead of Windows Browser.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.