Cant run streamlit, toml/decoder error

Hi,

when I try to run streamlit hello in my terminal, I get:

streamlit hello
Traceback (most recent call last):
File “/Users/diwaker/opt/anaconda3/lib/python3.7/site-packages/toml/decoder.py”, line 456, in loads
multibackslash)
File “/Users/diwaker/opt/anaconda3/lib/python3.7/site-packages/toml/decoder.py”, line 725, in load_line
value, vtype = self.load_value(pair[1], strictly_valid)
File “/Users/diwaker/opt/anaconda3/lib/python3.7/site-packages/toml/decoder.py”, line 739, in load_value
raise ValueError(“Empty value is invalid”)
ValueError: Empty value is invalid

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Users/diwaker/opt/anaconda3/bin/streamlit”, line 6, in
from streamlit.cli import main
File “/Users/diwaker/opt/anaconda3/lib/python3.7/site-packages/streamlit/init.py”, line 112, in
from streamlit.DeltaGenerator import DeltaGenerator as _DeltaGenerator
File “/Users/diwaker/opt/anaconda3/lib/python3.7/site-packages/streamlit/DeltaGenerator.py”, line 34, in
from streamlit import caching
File “/Users/diwaker/opt/anaconda3/lib/python3.7/site-packages/streamlit/caching.py”, line 42, in
from streamlit.hashing import CodeHasher
File “/Users/diwaker/opt/anaconda3/lib/python3.7/site-packages/streamlit/hashing.py”, line 44, in
from streamlit.folder_black_list import FolderBlackList
File “/Users/diwaker/opt/anaconda3/lib/python3.7/site-packages/streamlit/folder_black_list.py”, line 39, in
if config.get_option(“global.developmentMode”):
File “/Users/diwaker/opt/anaconda3/lib/python3.7/site-packages/streamlit/config.py”, line 95, in get_option
parse_config_file()
File “/Users/diwaker/opt/anaconda3/lib/python3.7/site-packages/streamlit/config.py”, line 880, in parse_config_file
_update_config_with_toml(file_contents, filename)
File “/Users/diwaker/opt/anaconda3/lib/python3.7/site-packages/streamlit/config.py”, line 802, in _update_config_with_toml
parsed_config_file = toml.loads(raw_toml)
File “/Users/diwaker/opt/anaconda3/lib/python3.7/site-packages/toml/decoder.py”, line 458, in loads
raise TomlDecodeError(str(err), original, pos)
toml.decoder.TomlDecodeError: Empty value is invalid (line 3 column 1 char 25)

How can I resolve it?

Hey @DeWa,

Could you give us the following information?

Debug info

  • Streamlit version: (get it with $ streamlit version)
  • Python version: (get it with $ python --version)
  • Using Conda? PipEnv? PyEnv? Pex?
  • OS version:
  • Browser version:

Hey thanks, I deleted .streamlit in the home folder and everything worked fine again.

1 Like

can you tell me what did you delete exactly?

1 Like

“.streamlit” is a hidden folder in the home folder, maybe that is the source of confusion here.

One way to solve this entire problem is to delete a specific file (i.e. config.toml) inside the “.streamlit” folder. Execute the prompt and search manually for the folder:
cd ~/.streamlit

Delete it:
rm config.toml

Good luck!

1 Like

many people said deleting config.toml file will solve the problem, but I didn’t find the file either
I think it’s by default in windows so i can’t edit it or delete it