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 st.set_page_config.
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.
The directory structure looks right and the content of config.toml looks good. Can you check to see if the quotation marks in the config.toml is not the curly quotation marks which may come from copy-pasting contents from web browsers.
I am guessing this might be then a conflict in my code? I am experiencing a similar problem here same with the page names, when using show pages. The names change only for a while, and after a while the page names return to the file names.
I decided to change the main app name from “ambelin.py” which is my project name to “streamlit_app.py” and all works like a charm (I had to delete the app and redeploy it, since the main file name changed), the show pages problem thing still persist, my page name are not being picked correctly.
Somewhere inside the config.toml methodolgy - process the app looks for this specific name “streamlit_app.py” and no other file name?
I have other apps where the main app name is different to “streamlit_app.py” and the theme is still not being picked up. This change here worked for me. I will test changing the file name to “streamlit_app.py” In the other apps as well.
I tried rebooting the app, but since the main file name changed from “myproject.py” to “streamlit_app.py”. I had to delete the app and redeploy as new to set the new main file path to “streamlit_app.py”.
For me the the issue was already when I ran locally. It had worked perfectly with my config file, until yesterday when it just didn’t.
What I had done a few days ago was show off the “theme function” to a colleague. I had then manually pressed the hamburger menu (on localhost:8501) → Settings and chosen Light theme instead of my usual Custom Theme. Apparently, I just realized, this change persisted through multiple reruns, reloads, computer turned on and off and what not. I had to go back to my hamburger menu and choose Custom Theme again, and now my own theme is working perfectly.
Since this change persisted across so many reruns, there has to be some link or variable somewhere that is kept for future use (@streamlit-crew do explain ). That could also explain why changing names of the app makes it work again, as some of you did.
I haven’t tried deploying it with my accidental manual light theme settings, so I don’t know if that kept variable would follow to the cloud or not, but it might.
Hope this helps someone!
For me, the problem was that windows did not recognise my file as being a .toml file. Copying the credentioals.toml file from ~./streamlit and changing its name and contents to be a config.toml file fixed the issue.