langflow-ai / langflow

⛓️ Langflow is a visual framework for building multi-agent and RAG applications. It's open-source, Python-powered, fully customizable, model and vector store agnostic.
http://www.langflow.org
MIT License
20.38k stars 3.01k forks source link

CommandError: Multiple head revisions are present for given argument 'head'; please specify a specific target revision, '<branchname>@head' to narrow to a specific head, or 'heads' for all heads #2215

Open nguyenlykhanhlinh opened 2 weeks ago

nguyenlykhanhlinh commented 2 weeks ago

Describe the bug I encountered a bug when I installed using the following command: python -m pip install langflow==0.6.19 --force-reinstall And I encountered an error as in the picture, how can I fix this error?

Browser and Version

Screenshots image image

dosubot[bot] commented 2 weeks ago

To fix the error related to multiple head revisions in Alembic when running Langflow, you need to merge the multiple heads. Here are the steps to resolve this issue:

  1. Identify the current heads:

    alembic heads
  2. Merge the heads:

    alembic merge <head1> <head2> -m "merge heads"

Replace <head1> and <head2> with the actual revision IDs of the heads you want to merge. This will create a new migration script that merges the multiple heads into a single head, resolving the conflict.

Additionally, ensure that Alembic is properly initialized and configured in your Langflow setup. You can refer to the DatabaseService class in src/backend/base/langflow/services/database/service.py for methods like init_alembic and run_migrations to handle Alembic initialization and migrations [1][2].

To continue talking to Dosu, mention @dosu.

nicoloboschi commented 1 week ago

Are you getting the same with latest 1.0.5?