I’m getting this error from SQLAlchemy:
sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:postgres
turns out, the DB URL generated by Render is an obsolete one — now
postgres: is deprecated, and should use
Context: python - sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:postgres - Stack Overflow
Will you fix this soon?
Thanks for reaching out.
SQLAlchemy is one of the only Postgres clients that enforces the
postgresql:// scheme, most others will accept it along with
libpq of Postgres itself also accepts both (docs)
This is discussed at length in a GitHub issue here: https://github.com/sqlalchemy/sqlalchemy/issues/6083
A couple of workarounds could be:
- If you’re setting a database URL on your service manually, amend the scheme to
postgresql:// when creating the env var.
- Or, of you’re getting a database env var setup via a Blueprint, then a small check in code may help, as suggested in the GitHub issue above.
However, I’ll raise this with the Datastores team.
Thanks for your response!
Actually, I faced the same problem the second time today with Retool, a trending Admin-as-a-Service app.
They take the DB URL string, and
postgres: scheme failed, while manually modifying it to
So it’s not just SQLAlchemy, it’s more than that. I’m not sure if it’s a good trade-off worth saving 2 characters?
Thanks for pointing out another case, however, I didn’t say SQLAlchemy was the only example. I’ll still be running this past our engineers, until then, you’ll need to add the
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.