Return self._connection_cls(self, close_with_result=close_with_result)įile "/home/user/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 96, in _init_įile "/home/user/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 3394, in raw_connection Return _options().execute(*args, **kwargs)įile "/home/user/.local/lib/python3.8/site-packages/sqlalchemy/util/deprecations.py", line 402, in warnedįile "/home/user/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 3256, in executeĬonnection = nnect(close_with_result=True)įile "/home/user/.local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 3315, in connect OperationalError: (psycopg2.OperationalError) connection to server at “ .uk” (193.62.192.243), port 5432 failed: Connection timed out Is the server running on that host and accepting TCP/IP connections? (Background on this error at: Error Messages - SQLAlchemy 1.4 Documentation)Īnd traceback: File "/home/user/.local/lib/python3.8/site-packages/streamlit/scriptrunner/script_runner.py", line 554, in _run_scriptįile "/home/user/app/app.py", line 33, in įile "/home/user/.local/lib/python3.8/site-packages/pandas/io/sql.py", line 400, in read_sql_queryįile "/home/user/.local/lib/python3.8/site-packages/pandas/io/sql.py", line 1560, in read_queryįile "/home/user/.local/lib/python3.8/site-packages/pandas/io/sql.py", line 1405, in execute ![]() Test_data = pd.read_sql_query(test_query, get_connection()) With st.spinner(text="In progress, this may take some time."): Project_id_button = st.text_input("Project ID", key="project_id") # project ID not currently used, any project ID will work Postgres_string = sqlalchemy.create_engine(postgres_string) I have also been able to successfully run the streamlit app locally. ![]() However, I have been unable to connect to Postgres DBs, either using a private postgres DB or a publicly available DB as referenced within the code. ![]() I have been able to successfully setup and use a couple of excellent Hugging Face space streamlit apps (including connecting to an AWS DynomoDB no sql DB.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |