Skip to content

Issue connecting to PostgreSQL #14

@mcolosimo-p4

Description

@mcolosimo-p4

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions