SSL Certificate "Does Not Exist"

If you’re creating a debugging post, please include the following info:

  1. Are you running your app locally or is it deployed?
    - Locally run
  2. Share the full text of the error message (not a screenshot).
    - 2024-05-15 16:27:32.547 Cert file ‘/sage.pem’ does not exist.
  3. Share the Streamlit and Python versions.
    - Streamlit 1.34, Python 3.11.7

I am fairly certain I am providing the correct directory location. The application folder is here:


I placed my .pem and .key files in that same folder so it is in the same application area.

This is the batch file I am running my streamlit application with:

python -m streamlit run "E:\\Sage\\Sage Assistant -" --theme.primaryColor "#5c0f8b" --theme.backgroundColor "#ffffff" ui.hideTopBar true --server.runOnSave true --server.port 443 --server.sslCertFile "sage.pem" --server.sslKeyFile "sage.key"

I’ve even tried “/sage.pem” and “/sage.key”.

Here is a picture of my folder.

Following up on this. I have no idea why Streamlit is not locating my pem and key file even though they are in the same folder as the Streamlit application.

Because you are probably calling streamlit from a different location and therefore the paths are wrong. If you cd into the Sage folder and call it from there, it will probably work.

Btw, don’t use python scripts with whitespaces in the filename, this is bad practice.
Btw, enable visible file endings in windows explorer, this is also a potentially trap.

Because it is searching for it in "/", which is a different folder.

It was the visible file endings. My .pem file had a .crt. It looks like this “sage.pem.crt”. Thank you so much.

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