Issue connecting to PostgreSQL
mcolosimo-p4 opened this issue · 0 comments
mcolosimo-p4 commented
I'm trying to connect to my postgres db
uri = f"postgresql://dbuser:secret@localhost:5433/db"
uri = "Driver={PostgreSQL};Server=localhost;Port=5433;Database=db;User Id=dbuser;Password=secret"
conn = ad.ODBCConnector(uri)
Traceback (most recent call last):
File "/home/mcolosimo/Projects/Paradigm4/cs_tool_kit/sql_variants_server/polars-loader/./pl_arrowdantic_sql.py", line 12, in <module>
with ad.ODBCConnector(uri) as conn:
File "/home/mcolosimo/miniconda3/lib/python3.9/site-packages/arrowdantic/__init__.py", line 712, in __enter__
self._connection = _arrowdantic_internal.ODBCConnector(self._connection_string)
pyo3_runtime.PanicException: called `Result::unwrap()` on an `Err` value: Diagnostics { record: State: S1009, Native error: 0, Message: [unixODBC][Driver Manager]Invalid attribute value, function: "SQLSetEnvAttr" }
I tried a few more iterations for the connection string and nothing works. I have no issue using adbc_driver_postgresql.dbapi
with that uri
Versions:
Python 3.9.12 (main, Apr 5 2022, 06:56:58)
[GCC 7.5.0] :: Anaconda, Inc. on linux
arrowdantic 0.2.2