[FIXED] App DOESN'T run locally, DOES run on cloud :/ (Using snowflake tutorial)

So a pretty weird problem. I’m doing a data engineering bootcamp and have chosen streamlit to present my final project. I’ve set up an etl through aws which then pops all my data nicely into snowflake.

I’ve run through the snowflake tutorial, and uploaded to the cloud, just using the tutorial code with uploaded secrets… It works perfectly fine on the cloud, but locally the app says the query execution completes, but then it just immediately closes streamlit, doesn’t display the query result on the app or in terminal (where I’ve added print statements)

Again this is just the tutorial code, sure I’ve tried a multitude of things since to try and get it to work but nothing seems to change. It’s not my credentials as making a change causes it to error, to be clear there is no error here, the app just stops after is says it’s made the query, but again it works perfectly fine on the cloud and now I’m so confused :confused: can someone help?

Running init_connection(). # THIS COMPLETES
Running run_query(…). # GETS STUCK HERE

TERMINAL

UserWarning: You have an incompatible version of ‘pyarrow’ installed (8.0.0), please install a version that adheres to: ‘pyarrow<6.1.0,>=6.0.0; extra == “pandas”’
warn_incompatible_dep(
2022-07-06 15:59:07.791 Snowflake Connector for Python Version: 2.7.9, Python Version: 3.10.3, Platform: Windows-10-10.0.22000-SP0
2022-07-06 15:59:07.792 This connection is in OCSP Fail Open Mode. TLS Certificates would be checked for validity and revocation status. Any other Certificate Revocation related exceptions or OCSP Responder failures would be disregarded in favor of connectivity.
2022-07-06 15:59:07.792 Setting use_openssl_only mode to False
2022-07-06 15:59:08.909 query: [SELECT * from redshift_customerdata;]
2022-07-06 15:59:09.083 query execution done
(venv) PS C:\Users\robfa\Downloads\SSS>

This is all happening in like 2 second and the local app is just stuck saying

Running run_query(...) .

:frowning:
I’ve tried the exact tutorial code, I’ve tried making changes, I’ve tried removing singleton and memo, I’ve tried so much and absolutely nothing stops it from saying query execution done and then just closing.

Here is the code for reference

app_dashboard.py
import streamlit as st
import snowflake.connector

@st.experimental_singleton
def init_connection():
return snowflake.connector.connect(**st.secrets[“snowflake”])

conn = init_connection()

@st.experimental_memo(ttl=600)
def run_query(query):
with conn.cursor() as cur:
cur.execute(query)
return cur.fetchall()

def run():
st.write(“Let gooooo”)

rows = run_query("SELECT * from redshift_customerdata;")

for row in rows:
    st.write(f"{row[0]} has a :{row[1]}:")
    print(row)

print(rows)

run()

Seriously appreciate any help I can get, I’ve looked around but couldnt find anything similar… unless I’m being super dumb but its so weird as it works perfectly fine on the cloud.

Ok I figured it out - needed to uninstall pyarrow 8.0.0 and install 6.0.0 d’oh, someone can close this thread i tried to delete it but I couldnt