TomlDecodeError: Key group not on a line by itself

streamlit hello
Traceback (most recent call last):
File “c:\users\vidhi\anaconda3\lib\runpy.py”, line 193, in run_module_as_main
main”, mod_spec)
File “c:\users\vidhi\anaconda3\lib\runpy.py”, line 85, in run_code
exec(code, run_globals)
File "C:\Users\VIDHI\anaconda3\Scripts\streamlit.exe_main
.py", line 4, in
File "c:\users\vidhi\anaconda3\lib\site-packages\streamlit_init
.py", line 99, in
from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
File “c:\users\vidhi\anaconda3\lib\site-packages\streamlit\delta_generator.py”, line 19, in
from streamlit import caching
File “c:\users\vidhi\anaconda3\lib\site-packages\streamlit\caching.py”, line 40, in
from streamlit.hashing import Context
File “c:\users\vidhi\anaconda3\lib\site-packages\streamlit\hashing.py”, line 39, in
from streamlit.folder_black_list import FolderBlackList
File “c:\users\vidhi\anaconda3\lib\site-packages\streamlit\folder_black_list.py”, line 39, in
if config.get_option(“global.developmentMode”):
File “c:\users\vidhi\anaconda3\lib\site-packages\streamlit\config.py”, line 86, in get_option
parse_config_file()
File “c:\users\vidhi\anaconda3\lib\site-packages\streamlit\config.py”, line 981, in parse_config_file
_update_config_with_toml(file_contents, filename)
File “c:\users\vidhi\anaconda3\lib\site-packages\streamlit\config.py”, line 897, in _update_config_with_toml
parsed_config_file = toml.loads(raw_toml)
File “c:\users\vidhi\anaconda3\lib\site-packages\toml\decoder.py”, line 434, in loads
original, pos)
toml.decoder.TomlDecodeError: Key group not on a line by itself. (line 1 column 1 char 0)

Unable to fix this error

Run streamlit cache clear

You will get output similar to this which will tell you where is your .streamlit directory exactly, take this path before the cache part.

Nothing to clear at {Username}{path}.streamlit\cache.

cd {Username}\{path}\.streamlit

You’ll be able to see config.toml here just delete that file.