I have created a config.toml file in my streamlit project. Whenever I run my python file, the theme from the toml file doesn’t change in my app. I’m using pycharm as an IDE.
Steps to reproduce
My pycharm file list looks like this. Did I create the config.toml file correctly?
My config.toml file look like this.
How can I make sure that my python app uses the toml file?
Hi @jbaekelm, welcome to the community
From your screenshot it looks like you’ve misspelled the filename as congif.toml, instead of
Thank you for the quick reply. I have changed that. Still no improvement. I have looked with streamlit config show.
What can I do next?
Did you explicitely set the theme to “Custom theme” in the hamburger menu? Sometimes it doesn’t work by simply placing the .toml file in the .streamlit folder.
I find this very confusing as well. Would be better if the app itself could enforce to use the custom theme if available through
Where are you running
streamlit config show from? If you are running it from inside the
app folder, then it won’t pick up on the
.streamlit folder, and so will ignore the config.toml file. If you are running it from the top level folder it should recognize and use the config file.
Also, what version of streamlit are you using?
Hello, I have the same issue.
I created a config.toml file in a .streamlit folder, itself in my app/root folder. I changed the base theme to “dark” but it does not apply.
Hi Pat! Your file shows that the
base = "dark" line is commented out. Try removing the
# prefix on that line.
oh Gee!.. beginner’s mistake … Thanks a lot @mathcatsand. Next time, I will double-check before posting something.