Streamlit is broken, i have already try to uninstall packages and python but return with the same error.
PS C:\Users\pietr\OneDrive\Desktop\Codici python> streamlit run app.py
Traceback (most recent call last):
File “”, line 198, in _run_module_as_main
File “”, line 88, in run_code
File "C:\Users\pietr\AppData\Local\Programs\Python\Python311\Scripts\streamlit.exe_main.py", line 7, in
File “C:\Users\pietr\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py”, line 1130, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\pietr\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py”, line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File “C:\Users\pietr\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\pietr\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py”, line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\pietr\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py”, line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\pietr\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\web\cli.py”, line 174, in main_run
bootstrap.load_config_options(flag_options=kwargs)
File “C:\Users\pietr\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\web\bootstrap.py”, line 315, in load_config_options
config.get_config_options(force_reparse=True, options_from_flags=options_from_flags)
File “C:\Users\pietr\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\config.py”, line 1091, in get_config_options
file_contents = input.read()
^^^^^^^^^^^^
File “”, line 322, in decode
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xff in position 0: invalid start byte
In addition to deleting the config.toml file, I have found only one (so far) decently stable version of streamlit. Version 0.62 seems work reasonably well, and even even with that, the version requirements of the other components is not properly defined. I have found these module version to work reasonably well, deviate from this at your own risk… I don’t think the python version is super critical, and MOST of the modules are the latest version I could install at the time, but a couple are older versions and if you install the newest version, various functions in streamlit break. If anyone can tell me the versions (if there are any) that get streamlit 1.17 (latest version) working completely, I would REALLY like to know! Someone REALLY needs to adjust the module requirements file!
I don’t quite get what you are asking here. Streamlit should work with any versions of its dependencies matching the specifications in setup.py. If there is a case where it doesn’t that is probably worth a bug report.
pip is sometimes unable to satisfy all the specifications for a package and installs a version which is not compatible with all of them, but that is a limitation of pip’s dependency resolution algorithm.
I wasn’t asking, I am making a statement, and yes, it is a bug! If you actually have a recent version of streamlit running more recent than 0.62 I would appreciate knowing what version of python you are using, what os, and the output from the command “pip freeze”.
I have created another microsoft account to use streamlit because no of your suggest works. The error is still there, i don’t know what happened to the program.
Run this code at the beginning of your application and see what files and directories appear:
from pathlib import Path
for path in (Path.home(), Path.cwd()):
path = path / ".streamlit"
st.text(path)
if path.exists():
for child in path.iterdir():
st.text(child)
@abcbarrynstreamlit hello runs normally on a fresh Python 3.9, with a fresh virtual environment, with Streamlit installed by pip install streamlit with no pinned dependencies. Examine your OS (Windows?) and Python installation, try to figure out the exact paths of the executables you are using (python, pip, streamlit) and any permission issues you might be having. Also, stop pinning dependencies just for the sake of it. This is definitely a “your environment” type of problem.
@Dottor_Scotti making a new Windows account because something is wrong with your Python is a little extreme. You should start using virtual environments for your projects; maybe start here: Python Virtual Environments: A Primer – Real Python and see what happens in a clean environment?
Ok, so I created a virtual machine (VMWare) running Centos 9 and installed python 3.9.6 and streamlit 1.17 failed, then I wiped the system, reinstalled and installed python 3.11 and it worked. Then I wiped it again and tried python 3.9.16 and that also worked, but python 3.9.6 and 3.9.4 will not work on the two different systems I tried.
I know it’s very extreme way, but i have followed all advice e nothing work for me. Disinstalling all libraries, python versions, vs code, cancel config.toml and with creation of a virtual environment it remain still this error: (venv) PS C:\Users\pietr\OneDrive\Desktop\Codici python> streamlit run app.py
Traceback (most recent call last):
File “”, line 198, in _run_module_as_main
File “”, line 88, in run_code
File "C:\Users\pietr\AppData\Local\Programs\Python\Python311\Scripts\streamlit.exe_main.py", line 7, in
File “C:\Users\pietr\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py”, line 1130, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\pietr\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py”, line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File “C:\Users\pietr\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\pietr\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py”, line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\pietr\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py”, line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\pietr\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\web\cli.py”, line 174, in main_run
bootstrap.load_config_options(flag_options=kwargs)
File “C:\Users\pietr\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\web\bootstrap.py”, line 315, in load_config_options
config.get_config_options(force_reparse=True, options_from_flags=options_from_flags)
File “C:\Users\pietr\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\config.py”, line 1091, in get_config_options
file_contents = input.read()
^^^^^^^^^^^^
File “”, line 322, in decode
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xff in position 0: invalid start byte
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
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.
Performance cookies
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.
Functional cookies
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.
Targeting cookies
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.