encode / databases

Async database support for Python. 🗄
https://www.encode.io/databases/
BSD 3-Clause "New" or "Revised" License
3.8k stars 260 forks source link

ImportError Postgresql #572

Open Warglaive opened 10 months ago

Warglaive commented 10 months ago

OS: Windows 10 Python: 3.11 databases version: 0.8.0 database backend: postgresql database driver: asyncpg

Issue stacktrace: `D:\project-management-service\API\env\Scripts\python.exe -m uvicorn main:app --reload INFO: Will watch for changes in these directories: ['D:\project-management-service\API'] INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) INFO: Started reloader process [17016] using StatReload D:\project-management-service\API\env\Lib\site-packages\pydantic_internal_config.py:317: UserWarning: Valid config keys have changed in V2:

Please correct me if I did not report he issue properly.

Warglaive commented 10 months ago

The problem has a very simple solution. Go to: site-packages\databases\backends\postgres.py and Replace from sqlalchemy.dialects.postgresql import pypostgresql with from sqlalchemy.dialects import postgresql as pypostgresql