Please help

sir please help me

while I am running streamlit run app.py
this is showing
Traceback (most recent call last):
File “C:\Users\USER\AppData\Local\Programs\Python\Python39\lib\runpy.py”, line 197, in _run_module_as_main
return run_code(code, main_globals, None,
File “C:\Users\USER\AppData\Local\Programs\Python\Python39\lib\runpy.py”, line 87, in run_code
exec(code, run_globals)
File "C:\Users\USER\PycharmProjects\pythonProject\venv\Scripts\streamlit.exe
main
.py", line 7, in
File “c:\users\user\pycharmprojects\pythonproject\venv\lib\site-packages\click\core.py”, line 829, in call
return self.main(*args, **kwargs)
File “c:\users\user\pycharmprojects\pythonproject\venv\lib\site-packages\click\core.py”, line 782, in main
rv = self.invoke(ctx)
File “c:\users\user\pycharmprojects\pythonproject\venv\lib\site-packages\click\core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “c:\users\user\pycharmprojects\pythonproject\venv\lib\site-packages\click\core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “c:\users\user\pycharmprojects\pythonproject\venv\lib\site-packages\click\core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “c:\users\user\pycharmprojects\pythonproject\venv\lib\site-packages\streamlit\cli.py”, line 161, in main_run
bootstrap.load_config_options(flag_options=kwargs)
File “c:\users\user\pycharmprojects\pythonproject\venv\lib\site-packages\streamlit\bootstrap.py”, line 318, in load_config_options
config.get_config_options(force_reparse=True, options_from_flags=options_from_flags)
File “c:\users\user\pycharmprojects\pythonproject\venv\lib\site-packages\streamlit\config.py”, line 1082, in get_config_options
_update_config_with_toml(file_contents, filename)
File “c:\users\user\pycharmprojects\pythonproject\venv\lib\site-packages\streamlit\config.py”, line 959, in _update_config_with_toml
parsed_config_file = toml.loads(raw_toml)
File “c:\users\user\pycharmprojects\pythonproject\venv\lib\site-packages\toml\decoder.py”, line 433, in loads
raise TomlDecodeError(“Key group not on a line by itself.”,
toml.decoder.TomlDecodeError: Key group not on a line by itself. (line 1 column 1 char 0)
PS C:\Users\USER\PycharmProjects\pythonProject> conda create -y -n streamlit python=3.7

please help me sir

Hi,
Do you by any chance use a TOML file to theme your app?
Could you check if there is one in your .streamlit directory that is called config.toml? (so: .streamlit/config.toml)

There seems to be something wrong parsing the keys in it.
You can see an example of a correct TOML layout here:
https://docs.streamlit.io/en/latest/theme_options.html

No sir I am not using TOML file
I am just running these codes
import pandas as pd
import streamlit as st
st.title(“Movie recomendation”)

Hello @Sayantan_Chakrabarty,

Have you changed your streamlit configuration, either in C:\Users\USER\.streamlit\config.toml or C:\Users\USER\PycharmProjects\pythonProject\.streamlit\config.toml ? You might have an error in one of those.

1 Like

Thanks guys It has been solved

How did you solve it? It may help other people encountering the same issue.

1 Like

i am having same issue plz tell how you solved it?

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.

nope all i have is this in my folder
Directory: C:\Users\abdul.streamlit

Mode LastWriteTime Length Name


-a---- 2021-10-31 3:13 AM 36 .stable_random_id
-a---- 2021-10-31 3:13 AM 23 credentials.toml