Postgre: Can't load plugin

Hi I am trying to set up postgre in my replit instance. I keep getting errors (below) and i can’t figure out what the problem is.

Repl link:

Traceback (most recent call last):
  File "", line 17, in <module>
    db = SQLAlchemy(app)
  File "/home/runner/BannerAppDev/venv/lib/python3.10/site-packages/flask_sqlalchemy/", line 221, in __init__
  File "/home/runner/BannerAppDev/venv/lib/python3.10/site-packages/flask_sqlalchemy/", line 329, in init_app
    engines[key] = self._make_engine(key, options, app)
  File "/home/runner/BannerAppDev/venv/lib/python3.10/site-packages/flask_sqlalchemy/", line 617, in _make_engine
    return sa.engine_from_config(options, prefix="")
  File "/home/runner/BannerAppDev/venv/lib/python3.10/site-packages/sqlalchemy/engine/", line 803, in engine_from_config
    return create_engine(url, **options)
  File "<string>", line 2, in create_engine
  File "/home/runner/BannerAppDev/venv/lib/python3.10/site-packages/sqlalchemy/util/", line 281, in warned
    return fn(*args, **kwargs)  # type: ignore[no-any-return]
  File "/home/runner/BannerAppDev/venv/lib/python3.10/site-packages/sqlalchemy/engine/", line 552, in create_engine
    entrypoint = u._get_entrypoint()
  File "/home/runner/BannerAppDev/venv/lib/python3.10/site-packages/sqlalchemy/engine/", line 754, in _get_entrypoint
    cls = registry.load(name)
  File "/home/runner/BannerAppDev/venv/lib/python3.10/site-packages/sqlalchemy/util/", line 368, in load
    raise exc.NoSuchModuleError(
sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:postgres
1 Like

Did you pip install the correct packages?

You have to use postgresql:// URL instead of postgres:// now

Looks like your repl is private. If you still need help, please link a minimal repl which reproduces the issue