Skip to content
Home » sqlalchemy.exc.NoSuchModuleError: Can’t load plugin: sqlalchemy.dialects:postgres

sqlalchemy.exc.NoSuchModuleError: Can’t load plugin: sqlalchemy.dialects:postgres

To solve sqlalchemy.exc.NoSuchModuleError: Can’t load plugin: sqlalchemy.dialects:postgres error follow below methods.

ERROR LOG

sqlalchemy.exc.NoSuchModuleError: Can’t load plugin: sqlalchemy.dialects:postgres

How to solve sqlalchemy.exc.NoSuchModuleError: Can’t load plugin: sqlalchemy.dialects:postgres ?

The URI should start with postgresql:// instead of postgres://. SQLAlchemy used to accept both, but now only accepts the postgres name.

SQLAlchemy 1.4 removes the deprecated postgres dialect name; instead, the term postgresql must now be used. The dialect is the part of the URL that comes before the http://. SQLAlchemy 1.3 and earlier displayed a deprecation warning but accepted it anyhow.

To resolve this, change the postgres:/ in the URL to postgresql:/.

This problem is now displayed when working with Heroku, which uses Postgres in the DATABASE URL they offer, which you are most likely using for SQLALCHEMY DATABASE URI. To work around issue until they update it, change the variable on the Heroku dashboard to postgresql.

Hope the above solution works.

Also read :

AttributeError: ‘list’ object has no attribute ‘click’ – Selenium Webdriver