Replies: 1 comment
-
Hi @jhee-mb! I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together! In version 1.1.0 of Langflow, the database settings and code were updated to handle different database backends more flexibly. A key change involves the sanitization of the database URL to ensure compatibility with SQLAlchemy's expected dialect format. Specifically, if your database URL starts with To resolve the issue you're facing, ensure that your For more details, you can refer to the code snippet that handles this sanitization: def _sanitize_database_url(self):
if self.database_url.startswith("postgres://"):
self.database_url = self.database_url.replace("postgres://", "postgresql://")
logger.warning(
"Fixed postgres dialect in database URL. Replacing postgres:// with postgresql://. "
"To avoid this warning, update the database URL."
) Make sure your environment is set up correctly and that there are no other conflicting settings or dependencies that might be causing the issue [1]. |
Beta Was this translation helpful? Give feedback.
-
I was using PostgreSQL as an external database in an 1.0.19 version.
And new version(v1.1.0) was released yesterday, I'm going to use it.
I use the same LANGFLOW_DATABASE_URL variable(i.e.
postgresql://langflow:langflow@localhost:5432/langflow_db
), and run langflow with Makefile.Then I meet some errors, which seem to be related to sqlite.
ERROR :
AttributeError: module 'sqlalchemy.dialects' has no attribute 'sqlite'
in
.../langflow/services/database/service.py:121 in on_connection
And Langflow is shutdown.
If I use
sqlite:///./langflow.db
for LANGFLOW_DATABASE_URL variable, it works fine.How did the database settings and codes change?
And how can I use it as before?
Beta Was this translation helpful? Give feedback.
All reactions