Config.toml do not work after deployed

I change the background color in config.toml.
It works just fine locally, however the color does not change after being deployed in

my app repo

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.

  • Running streamlit apps from subfolders cause quite often problems on streamlit cloud, because the paths seems to be wrecked.
  • If you want to address parent folders, it gets even more complicated.
  • I would generally recommend to use only one streamlit project per github repo and always work from the root folder.

One thousand thanks. :slight_smile:

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

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/

So when people go from their local environment development to Streamlit Cloud, references like this will break:

with open('file.txt', 'r'):

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.


Thanks for the clarification, Randy. :+1:

Yeah, thats what i meant with “wrecked”, maybe not the right word for it :zipper_mouth_face:

I think most users don’t know this and are wondering, why their paths are not working anymore.

1 Like