How do i fix this TomlDecodeError?

I created an app it was working fine previously now I’m running into this error while I’m trying to run it.

(base) C:\Users\rsrdj\Desktop\Work\Portfolio\Python\Resume Web\Resume_app>streamlit run Resume.py
Traceback (most recent call last):
File “C:\ProgramData\Miniconda3\lib\runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “C:\ProgramData\Miniconda3\lib\runpy.py”, line 86, in run_code
exec(code, run_globals)
File "C:\ProgramData\Miniconda3\Scripts\streamlit.exe_main
.py", line 7, in
File “C:\ProgramData\Miniconda3\lib\site-packages\click\core.py”, line 1130, in call
return self.main(*args, **kwargs)
File “C:\ProgramData\Miniconda3\lib\site-packages\click\core.py”, line 1055, in main
rv = self.invoke(ctx)
File “C:\ProgramData\Miniconda3\lib\site-packages\click\core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “C:\ProgramData\Miniconda3\lib\site-packages\click\core.py”, line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “C:\ProgramData\Miniconda3\lib\site-packages\click\core.py”, line 760, in invoke
return __callback(*args, **kwargs)
File “C:\ProgramData\Miniconda3\lib\site-packages\streamlit\web\cli.py”, line 201, in main_run
bootstrap.load_config_options(flag_options=kwargs)
File “C:\ProgramData\Miniconda3\lib\site-packages\streamlit\web\bootstrap.py”, line 342, in load_config_options
config.get_config_options(force_reparse=True, options_from_flags=options_from_flags)
File “C:\ProgramData\Miniconda3\lib\site-packages\streamlit\config.py”, line 1184, in get_config_options
_update_config_with_toml(file_contents, filename)
File “C:\ProgramData\Miniconda3\lib\site-packages\streamlit\config.py”, line 1062, in _update_config_with_toml
parsed_config_file = toml.loads(raw_toml)
File “C:\ProgramData\Miniconda3\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)

Probably you messed up your .streamlt/config.toml file?

how do i fix that?

In your working directory, look at the .streamlit/config.toml file. Can you post the contents here for us to see? If you don’t have one, you may have a global config file.

If in doubt, add a .streamlit folder to your working directory and create an empty config.toml file manually. You can leave it empty if you don’t actually want to set anything. Otherwise the options are in the documentation: Configuration - Streamlit Docs

If there’s a chance you have some file corruption, you can delete and recreate your config file as well; it’s just text.

1 Like

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