Hello all, I am a bit of a newbie with all this so please bear with me
I am trying to deploy an app on streamlit cloud so my fitness clients can access workouts, log and track progress etc. Everything works perfectly locally but when I try and deploy to streamlit cloud I get an error in the first few lines of my app() when it is supposed to connect to my database. The error is
OSError: [Errno 8] Exec format error: â./cloud-sql-proxyâ
The code that produces the error is:
def app():
st.set_page_config(page_title=âCabral Fitness Exercise Prescriptionsâ)
with st.spinner(âConnecting to CloudâŚPlease Waitâ):
# Start the Cloud SQL proxy when the application starts
proxy_process = subprocess.Popen(
['./cloud-sql-proxy', '--address', st.secrets.proxy_credentials.address, '--port', st.secrets.proxy_credentials.port, st.secrets.proxy_credentials.name])
time.sleep(5)
conn = psycopg2.connect(**st.secrets.psycopg2_credentials)
I have been reading the Google Cloud SQL Auth proxy docs like crazy and feel like I am running in circles at this point. Any help would be greatly appreciated. The cloud-sql-proxy file does not seem to contain any important/secret information when I open it which is why I uploaded it to GitHub but perhaps I shouldnât? I am sure it is running something special behind the scenes that allows it to work locally but not when i deploy to streamlit cloud. You can find the repo at: