Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Compose Fails #4647

Closed
JadTawil77 opened this issue Nov 15, 2024 · 12 comments
Closed

Docker Compose Fails #4647

JadTawil77 opened this issue Nov 15, 2024 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@JadTawil77
Copy link

Bug Description

AttributeError: module
docker_example-langflow-1 | 'sqlalchemy.dialects' has no attribute
docker_example-langflow-1 | 'sqlite'

Reproduction

cd ../docker_example/
docker compose up

Expected behavior

I expect it to not throw errors

Who can help?

No response

Operating System

Ubuntu Linux

Langflow Version

latest

Python Version

None

Screenshot

No response

Flow File

No response

@JadTawil77 JadTawil77 added the bug Something isn't working label Nov 15, 2024
Copy link

dosubot bot commented Nov 15, 2024

@JadTawil77 Hello there! I'm here to help you with your Docker Compose issue. I'm a bot that can assist you in solving bugs, answering questions, and becoming a contributor. Let's work together to resolve the issue you're facing.

The error you're encountering, AttributeError: module 'sqlalchemy.dialects' has no attribute 'sqlite', suggests that there might be an issue with how the SQLite dialect is being imported or used in the Langflow codebase. In Langflow, the SQLite dialect is imported as follows:

from sqlalchemy.dialects import sqlite as dialect_sqlite

This import is used to check if the dbapi_connection is an instance of sqlite3.Connection or dialect_sqlite.aiosqlite.AsyncAdapt_aiosqlite_connection [1].

To resolve this issue, ensure that the version of SQLAlchemy being used is compatible with this import. The Langflow codebase specifies SQLAlchemy version >=2.0.36 [2]. Make sure your environment is using this version or a compatible one. If the issue persists, double-check the import statements and any custom configurations related to SQLAlchemy in your setup.

To continue talking to Dosu, mention @dosu.

@JadTawil77
Copy link
Author

@dosu Since we are running a docker container, the docker image should have all the necessary packages and their compatibilities, not my native machine.

Copy link

dosubot bot commented Nov 15, 2024

The Docker image should indeed include all necessary packages and their compatible versions. The base Docker image for Langflow is langflowai/langflow:latest [1]. If you're encountering issues with SQLAlchemy, it might be worth checking if the Docker image is up-to-date or if there are any known issues with the specific version of SQLAlchemy included in the image. You can try pulling the latest version of the image to ensure you have the most recent updates:

docker pull langflowai/langflow:latest

If the problem persists, it could be related to how the image is built or configured. You might want to inspect the Dockerfile or any custom configurations that could affect SQLAlchemy's behavior.

To continue talking to Dosu, mention @dosu.

@JadTawil77
Copy link
Author

Indeed the problem does persist with the latest image.

@Vaviloff
Copy link

We also observe this error after updating from the previous Docker container with an existing database.
Previously Langflow was working nicely.

@desenvolvedor-guibson-lizardo

e agora como podemos resolver isso? estou a horas aqui nisso

@desenvolvedor-guibson-lizardo

@JadTawil77 encontrou alguma resposta?

@JadTawil77
Copy link
Author

@desenvolvedor-guibson-lizardo Not yet.

We shouldn't have to use an old version of langchain to make the docker work. The docker image should be up to date with latest.
I will await a fix :)

@pasha-codefresh
Copy link

Build a Docker image from the main branch and push it to your own registry. This solved the problem for me.

Issue was fixed in this PR #4599

@Mavlarn
Copy link

Mavlarn commented Nov 19, 2024

Waiting for a quick update in docker hub.

@alireza-dhp
Copy link

I am also waiting to run an instance!

@italojohnny
Copy link
Member

Hello everyone,

This issue is related to #4572, which was resolved with PR #4599.

You can use the nightly version of Langflow as a temporary solution until the fix is included in the next official release!

For this reason, I will go ahead and close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants