# Streamlit broken

**URL:** <https://discuss.streamlit.io/t/streamlit-broken/36295>\
**Category:** Using Streamlit\
**Created:** [January 18, 2023, 4:50pm UTC](https://discuss.streamlit.io/t/streamlit-broken/36295 "2023-01-18T16:50:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dottor\_Scotti](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/dottor_scotti/32/21710_2.png) [@Dottor\_Scotti](https://discuss.streamlit.io/u/Dottor_Scotti)\
**Post date:** [January 18, 2023, 4:50pm UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/1 "2023-01-18T16:50:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Goyo](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/goyo/32/28219_2.png) [@Goyo](https://discuss.streamlit.io/u/Goyo)\
**Post date:** [January 18, 2023, 6:12pm UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/2 "2023-01-18T18:12:04Z")

</div>

Looks like you have a broken `config.toml` file somewhere and the app is crashing while trying to read it.

---

<div class="post-metadata">

**Author:** ![Dottor\_Scotti](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/dottor_scotti/32/21710_2.png) [@Dottor\_Scotti](https://discuss.streamlit.io/u/Dottor_Scotti)\
**Post date:** [January 21, 2023, 5:58pm UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/3 "2023-01-21T17:58:05Z")

</div>

How can i fix it? Are there any sample?

---

<div class="post-metadata">

**Author:** ![Goyo](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/goyo/32/28219_2.png) [@Goyo](https://discuss.streamlit.io/u/Goyo)\
**Post date:** [January 21, 2023, 6:15pm UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/4 "2023-01-21T18:15:03Z")

</div>

Open the file in your editor and save it again, make sure it is encoded as utf8 when saving.

---

<div class="post-metadata">

**Author:** ![Dottor\_Scotti](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/dottor_scotti/32/21710_2.png) [@Dottor\_Scotti](https://discuss.streamlit.io/u/Dottor_Scotti)\
**Post date:** [January 22, 2023, 5:19pm UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/5 "2023-01-22T17:19:31Z")

</div>

i create another config.toml empty but it result with the same error. Are there any option to cancel all old files and download again the new one?

---

<div class="post-metadata">

**Author:** ![Goyo](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/goyo/32/28219_2.png) [@Goyo](https://discuss.streamlit.io/u/Goyo)\
**Post date:** [January 22, 2023, 7:12pm UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/6 "2023-01-22T19:12:28Z")

</div>

If there is nothing you want to put in the `config.toml` file, then just delete it.

---

<div class="post-metadata">

**Author:** ![abcbarryn](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/abcbarryn/32/22477_2.png) [@abcbarryn](https://discuss.streamlit.io/u/abcbarryn)\
**Post date:** [February 1, 2023, 6:29am UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/7 "2023-02-01T06:29:47Z")

</div>

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!

```auto
Package Version
--------------------- -----------
altair 4.2.2
astor 0.8.1
asttokens 2.2.1
attrs 22.2.0
backcall 0.2.0
base58 2.1.1
blinker 1.5
boto3 1.26.60
botocore 1.29.60
cachetools 5.3.0
certifi 2022.12.7
charset-normalizer 3.0.1
click 8.0.0
comm 0.1.2
debugpy 1.6.6
decorator 5.1.1
entrypoints 0.4
enum-compat 0.0.3
executing 1.2.0
graphics.py 5.0.1.post1
idna 3.4
importlib-metadata 6.0.0
ipykernel 6.21.0
ipython 8.9.0
ipywidgets 8.0.4
jedi 0.18.2
Jinja2 3.1.2
jmespath 1.0.1
jsonschema 4.17.3
jupyter_client 8.0.2
jupyter_core 5.2.0
jupyterlab-widgets 3.0.5
MarkupSafe 2.1.2
matplotlib-inline 0.1.6
numpy 1.20.3
packaging 23.0
pandas 1.5.3
parso 0.8.3
pexpect 4.8.0
pickleshare 0.7.5
Pillow 9.4.0
pip 21.3.1
platformdirs 2.6.2
prompt-toolkit 3.0.36
protobuf 3.20.0
psutil 5.9.4
ptyprocess 0.7.0
pure-eval 0.2.2
pycairo 1.23.0
pydeck 0.7.1
Pygments 2.14.0
pyrsistent 0.19.3
python-dateutil 2.8.2
pytz 2022.7.1
pytz-deprecation-shim 0.1.0.post0
pyzmq 25.0.0
readline 6.2.4.1
requests 2.28.2
s3transfer 0.6.0
setuptools 67.0.0
six 1.16.0
stack-data 0.6.2
streamlit 0.62.0
tk 0.1.0
toml 0.10.2
toolz 0.12.0
tornado 6.2
traitlets 5.9.0
tzdata 2022.7
tzlocal 4.2
urllib3 1.26.14
validators 0.20.0
watchdog 2.2.1
wcwidth 0.2.6
wheel 0.38.4
widgetsnbextension 4.0.5
zipp 3.12.0

```

Specifically numpy, protobuf, pydeck and urllib3 must be the versions shown.

---

<div class="post-metadata">

**Author:** ![Goyo](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/goyo/32/28219_2.png) [@Goyo](https://discuss.streamlit.io/u/Goyo)\
**Post date:** [February 1, 2023, 12:11pm UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/8 "2023-02-01T12:11:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![abcbarryn](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/abcbarryn/32/22477_2.png) [@abcbarryn](https://discuss.streamlit.io/u/abcbarryn)\
**Post date:** [February 2, 2023, 7:16am UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/9 "2023-02-02T07:16:26Z")

</div>

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”.

---

<div class="post-metadata">

**Author:** ![Dottor\_Scotti](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/dottor_scotti/32/21710_2.png) [@Dottor\_Scotti](https://discuss.streamlit.io/u/Dottor_Scotti)\
**Post date:** [February 2, 2023, 9:41am UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/10 "2023-02-02T09:41:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Goyo](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/goyo/32/28219_2.png) [@Goyo](https://discuss.streamlit.io/u/Goyo)\
**Post date:** [February 2, 2023, 10:44am UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/11 "2023-02-02T10:44:04Z")

</div>

There must be a `config.toml` somewhere. Find it and delete it.

---

<div class="post-metadata">

**Author:** ![Goyo](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/goyo/32/28219_2.png) [@Goyo](https://discuss.streamlit.io/u/Goyo)\
**Post date:** [February 2, 2023, 10:55am UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/12 "2023-02-02T10:55:29Z")

</div>

Your statement amounts to a generic “I am having issues”, there is nothing specific that a developer could act upon.

> **Here is a list of packages that work together (for me at least) with python 3.11**
>
> ```auto
> altair==4.2.2
> attrs==22.2.0
> blinker==1.5
> cachetools==5.3.0
> certifi==2022.12.7
> charset-normalizer==3.0.1
> click==8.1.3
> colorama==0.4.6
> decorator==5.1.1
> entrypoints==0.4
> gitdb==4.0.10
> GitPython==3.1.30
> idna==3.4
> importlib-metadata==6.0.0
> Jinja2==3.1.2
> jsonschema==4.17.3
> markdown-it-py==2.1.0
> MarkupSafe==2.1.2
> mdurl==0.1.2
> numpy==1.24.1
> packaging==23.0
> pandas==1.5.3
> Pillow==9.4.0
> protobuf==3.20.3
> pyarrow==11.0.0
> pydeck==0.8.0
> Pygments==2.14.0
> Pympler==1.0.1
> pyrsistent==0.19.3
> python-dateutil==2.8.2
> pytz==2022.7.1
> pytz-deprecation-shim==0.1.0.post0
> requests==2.28.2
> rich==13.3.1
> semver==2.13.0
> six==1.16.0
> smmap==5.0.0
> streamlit==1.17.0
> toml==0.10.2
> toolz==0.12.0
> tornado==6.2
> typing_extensions==4.4.0
> tzdata==2022.7
> tzlocal==4.2
> urllib3==1.26.14
> validators==0.20.0
> watchdog==2.2.1
> zipp==3.12.0
> 
> ```

---

<div class="post-metadata">

**Author:** ![Goyo](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/goyo/32/28219_2.png) [@Goyo](https://discuss.streamlit.io/u/Goyo)\
**Post date:** [February 2, 2023, 11:44am UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/13 "2023-02-02T11:44:43Z")

</div>

Run this code at the beginning of your application and see what files and directories appear:

```auto
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)

```

---

<div class="post-metadata">

**Author:** ![abcbarryn](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/abcbarryn/32/22477_2.png) [@abcbarryn](https://discuss.streamlit.io/u/abcbarryn)\
**Post date:** [February 2, 2023, 6:51pm UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/14 "2023-02-02T18:51:54Z")

</div>

> [@Goyo](#):
>
> ```auto
> altair==4.2.2
> attrs==22.2.0
> blinker==1.5
> cachetools==5.3.0
> certifi==2022.12.7
> charset-normalizer==3.0.1
> click==8.1.3
> colorama==0.4.6
> decorator==5.1.1
> entrypoints==0.4
> gitdb==4.0.10
> GitPython==3.1.30
> idna==3.4
> importlib-metadata==6.0.0
> Jinja2==3.1.2
> jsonschema==4.17.3
> markdown-it-py==2.1.0
> MarkupSafe==2.1.2
> mdurl==0.1.2
> numpy==1.24.1
> packaging==23.0
> pandas==1.5.3
> Pillow==9.4.0
> protobuf==3.20.3
> pyarrow==11.0.0
> pydeck==0.8.0
> Pygments==2.14.0
> Pympler==1.0.1
> pyrsistent==0.19.3
> python-dateutil==2.8.2
> pytz==2022.7.1
> pytz-deprecation-shim==0.1.0.post0
> requests==2.28.2
> rich==13.3.1
> semver==2.13.0
> six==1.16.0
> smmap==5.0.0
> streamlit==1.17.0
> toml==0.10.2
> toolz==0.12.0
> tornado==6.2
> typing_extensions==4.4.0
> tzdata==2022.7
> tzlocal==4.2
> urllib3==1.26.14
> validators==0.20.0
> watchdog==2.2.1
> zipp==3.12.0
> 
> ```

Thanks for that! That does NOT work on my python 3.9 system. I get this:

# streamlit --version

Illegal instruction

# streamlit hello

Illegal instruction

I may try upgrading to python 3.11 later, but with 3.9, that is the result I get.

---

<div class="post-metadata">

**Author:** ![Goyo](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/goyo/32/28219_2.png) [@Goyo](https://discuss.streamlit.io/u/Goyo)\
**Post date:** [February 2, 2023, 10:23pm UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/15 "2023-02-02T22:23:35Z")

</div>

That seems to be very specific to your particular environment, which I know nothing about.

---

<div class="post-metadata">

**Author:** ![ennui](https://avatars.discourse-cdn.com/v4/letter/e/df705f/32.png) [@ennui](https://discuss.streamlit.io/u/ennui)\
**Post date:** [February 3, 2023, 9:48am UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/16 "2023-02-03T09:48:36Z")

</div>

@abcbarryn `streamlit 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](https://realpython.com/python-virtual-environments-a-primer/) and see what happens in a clean environment?

---

<div class="post-metadata">

**Author:** ![abcbarryn](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/abcbarryn/32/22477_2.png) [@abcbarryn](https://discuss.streamlit.io/u/abcbarryn)\
**Post date:** [February 5, 2023, 4:24am UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/17 "2023-02-05T04:24:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Dottor\_Scotti](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/dottor_scotti/32/21710_2.png) [@Dottor\_Scotti](https://discuss.streamlit.io/u/Dottor_Scotti)\
**Post date:** [February 5, 2023, 10:22am UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/18 "2023-02-05T10:22:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ennui](https://avatars.discourse-cdn.com/v4/letter/e/df705f/32.png) [@ennui](https://discuss.streamlit.io/u/ennui)\
**Post date:** [February 5, 2023, 10:44am UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/19 "2023-02-05T10:44:54Z")

</div>

Okay, if we assume it’s not the Python installation then let’s start over with your project:

1. Is there a `.streamlit` folder inside your project? Could be a hidden folder.
2. In VS Code there’s the file encoding shown in the bottom right. Are all your files UTF-8?
3. This is unlikely to be the problem, but could you try checking what happens if you move your project out of OneDrive?
4. Is there a repository you could publicly share?

edit: 5. What about `C:\Users\pietr\.streamlit`?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/streamlit/original/3X/c/f/cf4c2ee0d938358f82448c5fe4b9c3c91d7ce19c.svg) [@system](https://discuss.streamlit.io/u/system)\
**Post date:** [February 5, 2024, 10:44am UTC](https://discuss.streamlit.io/t/streamlit-broken/36295/20 "2024-02-05T10:44:57Z")

</div>

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
