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

Error creating DB and tables #23

Open
vertigo15 opened this issue Nov 22, 2024 · 1 comment
Open

Error creating DB and tables #23

vertigo15 opened this issue Nov 22, 2024 · 1 comment

Comments

@vertigo15
Copy link

I have followed the new instraction for loading lcangflow on docker and I am getting the following error in the log files:

Starting Langflow v1.1.0...
[11/22/24 18:48:39] ERROR 2024-11-22 18:48:39 - ERROR - utils utils.py:27
- Error creating DB and tables
Traceback (most recent call last):

      |         |              ->              
                         <traceback object at 0x7f1f73c8a400>               
                                   |         -> <method                     
                         'with_traceback' of 'BaseException'                
                         objects>                                           
                                   -> AttributeError("module                
                         'sqlalchemy.dialects' has no attribute             
                         'sqlite'")                                         
                           File                
@Disha1413
Copy link

Install Missing Dependencies
The error suggests that SQLAlchemy might be missing the SQLite dialect. Try the following steps:

Step 1: Add SQLite Package in Docker
Modify your Dockerfile or requirements.txt to include:

sqlite
sqlalchemy
sqlalchemy[asyncio]
Then rebuild your Docker container:

docker-compose up --build
Step 2: Manually Install SQLite in Your Docker Container
If you already have a running container, you can install the missing dependencies inside it:

Get into the Docker container

docker exec -it <container_id> /bin/sh
You can find your container_id by running:

docker ps
Install SQLite and SQLAlchemy dialects Inside the container, run:

pip install sqlite sqlalchemy sqlalchemy[asyncio]
Restart Langflow

docker restart <container_id>
Step 3: Check Your Database URL
If you're using an .env file, make sure the database URL is correct. Open your .env file and look for something like:

DATABASE_URL=sqlite+aiosqlite:///./db.sqlite3
If it’s missing sqlite+aiosqlite, update it and restart your container:

docker-compose down && docker-compose up -d
Final Check
Once the container restarts, check the logs again:

docker logs <container_id>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants