Environment
- Python: 3.10.12
- pyodbc: 5.0.0
- sqlalchemy: 2.0.21
- OS: Ubuntu 22.04 64bit
- DB: MSSQL (AzureSQL)
- driver: Microsoft ODBC Driver 18 for SQL Server (/opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.3.so.2.1)
- login method: token
Issue
Trying to connect with token as described in:
https://docs.sqlalchemy.org/en/20/dialects/mssql.html#connecting-to-databases-with-access-tokens
How to reproduce:
- login with
az login on your machine (in MS way)
- copy-paste sample code from the link and fill server/database
- add
engine.connect() at the end
- observe segmentation fault (core dumped)
Observations:
pyodbc 4.0.38 is not affected - above samples works well
Just pip install --upgrade pyodbc==4.0.38 solves the issue, in the same environment
Login with user-password works well
Trace in attachment
odbctrace.log
Environment
Issue
Trying to connect with token as described in:
https://docs.sqlalchemy.org/en/20/dialects/mssql.html#connecting-to-databases-with-access-tokens
How to reproduce:
az loginon your machine (in MS way)engine.connect()at the endObservations:
pyodbc 4.0.38 is not affected - above samples works well
Just
pip install --upgrade pyodbc==4.0.38solves the issue, in the same environmentLogin with user-password works well
Trace in attachment
odbctrace.log