Hi,
I change the background color in config.toml.
It works just fine locally, however the color does not change after being deployed in share.streamlit.io.
Anyone can help? Thanks in advance.
Hi,
I change the background color in config.toml.
It works just fine locally, however the color does not change after being deployed in share.streamlit.io.
Anyone can help? Thanks in advance.
I assume that the streamlit cloud runtime expects the .streamlit/config.toml
path in the root folder, but you have it nested in a subfolder, relative to the streamlit app.
Solved!
One thousand thanks.
Not exactly.
When you deploy from Streamlit Cloud, people assume that a cd mydir
happens, because that’s what a lot of people do on local development. This would imply a run command of:
streamlit run streamlit_app.py
But what Streamlit Cloud always does is starts at the top-level, passing in the entire path that the user puts into the launch window. This implies a run command of:
streamlit run apps/myapp/v2/justkidding/v7/streamlit_app.py
So when people go from their local environment development to Streamlit Cloud, references like this will break:
with open('file.txt', 'r'):
do_something()
While one could argue that Streamlit Cloud should be a “do what I mean” system, this is why we suggest that users make their path references using pathlib or similiar package, to programmatically determine where they are in the file tree so that the code is robust across any deployment platform.
Best,
Randy
Thanks for the clarification, Randy.
Yeah, thats what i meant with “wrecked”, maybe not the right word for it
I think most users don’t know this and are wondering, why their paths are not working anymore.
how did you solve it? i did not get it. thanks!
Thnaks for your answer. Do yo mean to put it at the root directory of github? How can i do that? (now it is inside a default branch called “main”)
thanks!
Hi Randy, i am still not getting your solution
can you give me some extra information?
do i have to put the file app.py at the root directory of my github? how can i do that?
best and thanks
Hi @pilarpique,
To put app.py
at the root directory, you would simply put it in your repository without putting it in a folder.
Hope that helps clarify!
Caroline
thank you very much caroline! actually my app.py is not in a folder and config.toml is still not working. do you know why this is happening?
Hi @pilarpique, have you tried deleting and re-deploying the app?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.