aio-libs / aioodbc

aioodbc - is a library for accessing a ODBC databases from the asyncio
Apache License 2.0
311 stars 60 forks source link

mssql+aioodbc sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:mssql.aioodbc #459

Open biyani701 opened 5 months ago

biyani701 commented 5 months ago

While trying to create DB driver with sqlalchemy, i am getting below error

sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:mssql.aioodbc

I am running on windows 11 and python 3.9.10 aioodbc version 0.5.0

Please suggest how to fix this error

biyani701 commented 5 months ago

SQLAlchemy Version is 2.0.19

gordthompson commented 4 months ago
pip install aioodbc
biyani701 commented 4 months ago

The issue was resolved after i upgraded sqlalchemy to latest version (2.0.31). is there any minimum required version for aioodbc?

gordthompson commented 4 months ago

is there any minimum required version for aioodbc?

2.0.23

danrayson commented 2 weeks ago

I had a similar error. Turned out my dialectic was wrong. I was using aiosqlite when it should have been aioodbc (obviously).

Now my connection string looks more like: DATABASE_URL=mssql+aioodbc: