Ubuntu 22.04, venv, no run
j2l opened this issue · comments
Philippe Manzano commented
Describe the bug
Doesn't run
Browser and Version
- Browser: none used
To Reproduce
Steps to reproduce the behavior:
- virtualenv flenv
- source flenv/bin/activate
- pipx install langflow --python python3.10 --fetch-missing-python --pip-args="--pre --force-reinstall"
- langflow run
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
⚠️ Note: langflow was already on your PATH at /mnt/phil/langflow/lfenv/bin/langflow
installed package langflow 1.0.0a24, installed using Python 3.10.12
These apps are now globally available
- langflow
done! ✨ 🌟 ✨
(lfenv) pm@pop-os:/mnt/phil/langflow$ langflow run
╭───────────────────────────────────────────────────╮
│ Welcome to ⛓ Langflow │
│ │
│ Access http://127.0.0.1:7860 │
│ Collaborate, and contribute at our GitHub Repo 🚀 │
╰───────────────────────────────────────────────────╯
[2024-04-19 10:31:32 +0200] [17398] [INFO] Starting gunicorn 21.2.0
[2024-04-19 10:31:32 +0200] [17398] [INFO] Listening at: http://127.0.0.1:7860 (17398)
[2024-04-19 10:31:32 +0200] [17398] [INFO] Using worker: uvicorn.workers.UvicornWorker
[2024-04-19 10:31:32 +0200] [17421] [INFO] Booting worker with pid: 17421
[2024-04-19 10:31:32 +0200] [17421] [INFO] Started server process [17421]
[2024-04-19 10:31:32 +0200] [17421] [INFO] Waiting for application startup.
[04/19/24 10:31:32] INFO 2024-04-19 10:31:32 - INFO - service - Alembic already initialized service.py:142
INFO 2024-04-19 10:31:32 - INFO - service - Running DB migrations in service.py:150
/mnt/phil/langflow/lfenv/lib/python3.10/site-packages/langflow/alembic
/mnt/phil/langflow/lfenv/lib/python3.10/site-packages/langflow/alembic/env.py:82: SAWarning: WARNING: SQL-parsed foreign key constraint '('user_id', 'user', 'id')' could not be located in PRAGMA foreign_keys for table flow
context.run_migrations()
/mnt/phil/langflow/lfenv/lib/python3.10/site-packages/langflow/alembic/env.py:82: SAWarning: WARNING: SQL-parsed foreign key constraint '('user_id', 'user', 'id')' could not be located in PRAGMA foreign_keys for table flow
context.run_migrations()
[04/19/24 10:31:35] ERROR 2024-04-19 10:31:35 - ERROR - service - AutogenerateDiffsDetected: {exc} service.py:162
ERROR 2024-04-19 10:31:35 - ERROR - utils - Something went wrong running utils.py:51
migrations. Please, run `langflow migration --fix`
ERROR 2024-04-19 10:31:35 - ERROR - utils - Something went wrong running utils.py:216
migrations. Please, run `langflow migration --fix`
[2024-04-19 10:31:35 +0200] [17421] [ERROR] Traceback (most recent call last):
File "/mnt/phil/langflow/lfenv/lib/python3.10/site-packages/langflow/services/database/service.py", line 160, in run_migrations
command.check(alembic_cfg)
File "/mnt/phil/langflow/lfenv/lib/python3.10/site-packages/alembic/command.py", line 300, in check
raise util.AutogenerateDiffsDetected(
alembic.util.exc.AutogenerateDiffsDetected: New upgrade operations detected: [('add_table', Table('credential', MetaData(), Column('name', AutoString(), table=<credential>), Column('value', AutoString(), table=<credential>), Column('provider', AutoString(), table=<credential>), Column('id', GUID(), table=<credential>, primary_key=True, nullable=False, default=CallableColumnDefault(<function uuid4 at 0x761ae09e6a70>)), Column('created_at', DateTime(timezone=True), table=<credential>, server_default=DefaultClause(<sqlalchemy.sql.functions.now at 0x761adbf584f0; now>, for_update=False)), Column('updated_at', DateTime(timezone=True), table=<credential>), Column('user_id', GUID(), ForeignKey('user.id'), table=<credential>, nullable=False), schema=None)), ('remove_table', Table('variable', MetaData(), Column('name', VARCHAR(), table=<variable>), Column('value', VARCHAR(), table=<variable>), Column('type', VARCHAR(), table=<variable>), Column('id', CHAR(length=32), table=<variable>, primary_key=True, nullable=False), Column('created_at', DATETIME(), table=<variable>), Column('updated_at', DATETIME(), table=<variable>), Column('user_id', CHAR(length=32), ForeignKey('user.id'), table=<variable>, nullable=False), schema=None)), [('modify_type', None, 'apikey', 'created_at', {'existing_nullable': True, 'existing_server_default': DefaultClause(<sqlalchemy.sql.elements.TextClause object at 0x761af874e890>, for_update=False), 'existing_comment': None}, TIMESTAMP(), DateTime(timezone=True))], ('remove_column', None, 'flow', Column('icon_bg_color', VARCHAR(), table=<flow>)), ('remove_column', None, 'flow', Column('icon', VARCHAR(), table=<flow>))]
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/mnt/phil/langflow/lfenv/lib/python3.10/site-packages/starlette/routing.py", line 734, in lifespan
async with self.lifespan_context(app) as maybe_state:
File "/usr/lib/python3.10/contextlib.py", line 199, in __aenter__
return await anext(self.gen)
File "/mnt/phil/langflow/lfenv/lib/python3.10/site-packages/langflow/main.py", line 20, in lifespan
initialize_services()
File "/mnt/phil/langflow/lfenv/lib/python3.10/site-packages/langflow/services/utils.py", line 217, in initialize_services
raise exc
File "/mnt/phil/langflow/lfenv/lib/python3.10/site-packages/langflow/services/utils.py", line 214, in initialize_services
initialize_database(fix_migration=fix_migration)
File "/mnt/phil/langflow/lfenv/lib/python3.10/site-packages/langflow/services/database/utils.py", line 52, in initialize_database
raise exc
File "/mnt/phil/langflow/lfenv/lib/python3.10/site-packages/langflow/services/database/utils.py", line 32, in initialize_database
database_service.run_migrations(fix=fix_migration)
File "/mnt/phil/langflow/lfenv/lib/python3.10/site-packages/langflow/services/database/service.py", line 164, in run_migrations
raise RuntimeError(
RuntimeError: Something went wrong running migrations. Please, run `langflow migration --fix`
[2024-04-19 10:31:35 +0200] [17421] [ERROR] Application startup failed. Exiting.
[2024-04-19 10:31:35 +0200] [17421] [INFO] Worker exiting (pid: 17421)
[2024-04-19 10:31:36 +0200] [17398] [ERROR] Worker (pid:17421) exited with code 3
[2024-04-19 10:31:36 +0200] [17398] [ERROR] Shutting down: Master
[2024-04-19 10:31:36 +0200] [17398] [ERROR] Reason: Worker failed to boot.
I also tried with the stable version, same error.
Any idea?
Philippe Manzano commented
Aaah, I removed ~/.cache/langflow and run langflow migration --fix
and now it runs.