Streamlit app has a different behavior when we launch it in foreground using CMD or in the background using batch mode

Hi Team,

We have seen a different behavior when streamlit app is launched in foreground manually using cmd or in background using batch mode. It seems that, app is not able to find some executables and files like Excel. I have attached few error screenshots below. As per the error, we have checked that no excel file was opened or excel process was running in background and still the issue persist.

We do not see this error when we launch the app in foreground manually using cmd or powershell. We are expecting any advise on this issue from you.

Thanks,
-Chetan

hey there!

Could you print out the working directory for when you’re running the Streamlit apps both ways? Also, is there a particular reason you need to launch the app using ‘batch mode’? I’m not a windows user so i’m not totally sure what batch mode is

Hi Tyler,

We are seeing Streamlit process getting killed/crashed for some unknown reason making the application server unavailable. To counter, we did some reactive step to check the port/process running and if not running, we start. Hence we are putting it thru batch mode. Batch mode (.bat/.ps1) is like running “shell (.sh)” script in Linux file.

Thanks,
-Chetan

@chetan-vaidya3d so when you run your Streamlit apps locally on Windows, the apps are getting killed? Do you have any logs for this? Is this happening right when you launch your Streamlit apps or some time afterwards? And am I right to say this is a local issue or do you have it deployed elsewhere?

Could you share the exact command that you’re running that does work, and the contents of the batch script that is failing?

Also, anything that you can share about the environment you’re running on could be helpful.

If you are able, could you also try minimizing your app down to a the smallest bit of code that still reproduces the error, then sharing that? See this post for more about what to share.

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