Hi there,
I’m working on snowflake badge 2 and when I’m running a query to trial metadata, this is the error I’m constantly getting.
i have deleted the app multiple times and recreated everything from an another account and even created a new github and streamlit account
i have even rebooted the app multiple times.
import.snowflake.connector
Added secrets in app (with my details)
[snowflake]
user = “xxx”
password = “xxx”
account = “acctlocator.region.cloud” <–Replace this with your Account Locator, etc - and delete this comment
warehouse = “pc_rivery_wh”
database = “pc_rivery_db”
schema = “public”
role = “pc_rivery_role”
then ran this syntax
my_cnx = snowflake.connector.connect(**streamlit.secrets[“snowflake”])
my_cur = my_cnx.cursor()
my_cur.execute(“SELECT CURRENT_USER(), CURRENT_ACCOUNT(), CURRENT_REGION()”)
my_data_row = my_cur.fetchone()
streamlit.text(“Hello from Snowflake:”)
streamlit.text(my_data_row)
and when I run this, the below error pops up
snowflake.connector.errors.OperationalError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you’re on Streamlit Cloud, click on ‘Manage app’ in the lower right of your app).
Traceback:
File “/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py”, line 552, in _run_script
exec(code, module.dict)
File “/mount/src/first_streamlit_app/streamlit_app.py”, line 36, in
my_cnx = snowflake.connector.connect(**streamlit.secrets[“snowflake”])
File “/home/adminuser/venv/lib/python3.9/site-packages/snowflake/connector/init.py”, line 51, in Connect
return SnowflakeConnection(**kwargs)
File “/home/adminuser/venv/lib/python3.9/site-packages/snowflake/connector/connection.py”, line 351, in init
self.connect(**kwargs)
File “/home/adminuser/venv/lib/python3.9/site-packages/snowflake/connector/connection.py”, line 623, in connect
self.__open_connection()
File “/home/adminuser/venv/lib/python3.9/site-packages/snowflake/connector/connection.py”, line 896, in __open_connection
self.authenticate_with_retry(self.auth_class)
File “/home/adminuser/venv/lib/python3.9/site-packages/snowflake/connector/connection.py”, line 1165, in authenticate_with_retry
self._authenticate(auth_instance)
File “/home/adminuser/venv/lib/python3.9/site-packages/snowflake/connector/connection.py”, line 1236, in _authenticate
raise auth_op from e
File “/home/adminuser/venv/lib/python3.9/site-packages/snowflake/connector/connection.py”, line 1213, in _authenticate
auth_instance.handle_timeout(
File “/home/adminuser/venv/lib/python3.9/site-packages/snowflake/connector/auth/by_plugin.py”, line 219, in handle_timeout
raise error
I’m not able to find any solutions for this and any help in the regard is much appreciated.
thanks in advance