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

Got unexpected extra argument (run) #4171

Open
kha84 opened this issue Oct 16, 2024 · 5 comments
Open

Got unexpected extra argument (run) #4171

kha84 opened this issue Oct 16, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@kha84
Copy link

kha84 commented Oct 16, 2024

Bug Description

Installed langflow as explained in document - https://docs.langflow.org/getting-started-installation with the only difference of creating conda env, as I didn't want it to install PIP packages directly to my system:

conda create -n langflow python=3.10
conda activate langflow
python -m pip install langflow -U
python -m langflow run

Upon running the last command I see this:

(langflow) user@magicbook14:~/Projects/Langflow$ python -m langflow run
Usage: python -m langflow [OPTIONS]
Try 'python -m langflow --help' for help.
╭─ Error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Got unexpected extra argument (run)                                                                                                                                                    │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

List of pip packages landed:

(langflow) user@magicbook14:~/Projects/Langflow$ pip list
Package                  Version
------------------------ ---------------
aiohappyeyeballs         2.4.3
aiohttp                  3.10.10
aiosignal                1.3.1
anyio                    4.6.2.post1
argilla                  1.29.1
async-timeout            4.0.3
attrs                    24.2.0
backoff                  2.2.1
beautifulsoup4           4.12.3
cachetools               5.5.0
certifi                  2024.8.30
chardet                  5.2.0
charset-normalizer       3.4.0
chromadb                 0.3.26
click                    8.1.7
clickhouse-connect       0.8.3
coloredlogs              15.0.1
dataclasses-json         0.5.14
Deprecated               1.2.14
dill                     0.3.9
docstring-parser         0.15
duckdb                   1.1.2
et-xmlfile               1.1.0
exceptiongroup           1.2.2
fake-useragent           1.5.1
fastapi                  0.92.0
filelock                 3.16.1
flatbuffers              24.3.25
frozenlist               1.4.1
google-api-core          2.21.0
google-api-python-client 2.149.0
google-auth              2.35.0
google-auth-httplib2     0.2.0
google_search_results    2.4.2
googleapis-common-protos 1.65.0
gptcache                 0.1.44
greenlet                 3.1.1
gunicorn                 20.1.0
h11                      0.14.0
hnswlib                  0.8.0
httpcore                 1.0.6
httplib2                 0.22.0
httptools                0.6.2
httpx                    0.26.0
huggingface-hub          0.13.4
humanfriendly            10.0
idna                     3.10
joblib                   1.4.2
langchain                0.0.176
langflow                 0.0.78
llama_cpp_python         0.1.50
lxml                     4.9.4
lz4                      4.3.3
Markdown                 3.7
markdown-it-py           3.0.0
marshmallow              3.22.0
mdurl                    0.1.2
monotonic                1.6
mpmath                   1.3.0
msg-parser               1.2.0
multidict                6.1.0
mypy-extensions          1.0.0
networkx                 3.4.1
nltk                     3.9.1
numexpr                  2.10.1
numpy                    1.26.4
olefile                  0.47
onnxruntime              1.19.2
openai                   0.27.10
openapi-schema-pydantic  1.2.4
openpyxl                 3.1.5
overrides                7.7.0
packaging                24.1
pandas                   1.5.3
pillow                   11.0.0
pip                      24.2
posthog                  3.7.0
propcache                0.2.0
proto-plus               1.24.0
protobuf                 5.28.2
psycopg2-binary          2.9.9
pulsar-client            3.5.0
pyarrow                  11.0.0
pyasn1                   0.6.1
pyasn1_modules           0.4.1
pydantic                 1.10.18
Pygments                 2.18.0
pypandoc                 1.14
pyparsing                3.2.0
pypdf                    3.17.4
pysrt                    1.1.2
python-dateutil          2.9.0.post0
python-docx              1.1.2
python-dotenv            1.0.1
python-magic             0.4.27
python-pptx              1.0.2
pytz                     2024.2
PyYAML                   6.0.2
regex                    2024.9.11
requests                 2.32.3
rich                     13.9.2
rsa                      4.9
setuptools               75.1.0
six                      1.16.0
sniffio                  1.3.1
soupsieve                2.6
SQLAlchemy               2.0.36
starlette                0.25.0
sympy                    1.13.3
tenacity                 8.5.0
tiktoken                 0.3.3
tokenizers               0.13.3
tqdm                     4.66.5
typer                    0.7.0
types-PyYAML             6.0.12.20240917
typing_extensions        4.12.2
typing-inspect           0.9.0
unstructured             0.5.13
uritemplate              4.1.1
urllib3                  2.2.3
uvicorn                  0.20.0
uvloop                   0.21.0
watchfiles               0.24.0
websockets               11.0.3
wheel                    0.44.0
wikipedia                1.4.0
wrapt                    1.14.1
XlsxWriter               3.2.0
yarl                     1.15.3
zstandard                0.23.0

Reproduction

Follow installation instructions on Ubuntu 24.04.1 - https://docs.langflow.org/getting-started-installation

Expected behavior

Langflow should start :)

Who can help?

No response

Operating System

Ubuntu 24.04.1

Langflow Version

0.0.78

Python Version

3.10

Screenshot

No response

Flow File

No response

@kha84 kha84 added the bug Something isn't working label Oct 16, 2024
Copy link

dosubot bot commented Oct 16, 2024

Hello @kha84! I'm here to help you with any bugs, questions, or contributions you have for Langflow. Let's squash those bugs together!

The error you're encountering, "Got unexpected extra argument (run)," suggests that the command syntax for running Langflow has changed. In recent versions, Langflow is run using the CLI command langflow run [OPTIONS] instead of python -m langflow run [1].

To resolve this issue, try running Langflow with the following command:

langflow run --host 0.0.0.0 --port 7860 --log-level info --workers -1 --backend-only

This should start Langflow on your local machine. If you continue to experience issues, ensure that Langflow is correctly installed in your conda environment and that there are no version conflicts.

To continue talking to Dosu, mention @dosu.

@kha84
Copy link
Author

kha84 commented Oct 16, 2024

(langflow) user@magicbook14:~/Projects/Langflow$ langflow run --host 0.0.0.0 --port 7860 --log-level info --workers -1 --backend-only
Usage: langflow [OPTIONS]
Try 'langflow --help' for help.
╭─ Error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ No such option: --backend-only                                                                                                                                                         │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
(langflow) user@magicbook14:~/Projects/Langflow$ langflow run --host 0.0.0.0 --port 7860 --log-level info --workers -1 
Usage: langflow [OPTIONS]
Try 'langflow --help' for help.
╭─ Error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Got unexpected extra argument (run)                                                                                                                                                    │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Thanks, @dosu but that ain't helping. I have a gut feeling the version I'm getting is way too old (0.0.78) and just does not support the "run" command. Bit strange, I got it, instead of the latest available version as per pypi which is 1.0.19 as per now

Copy link

dosubot bot commented Oct 16, 2024

It seems like you're right about the version issue. The run command is not supported in Langflow version 0.0.78. To resolve this, you should upgrade Langflow to the latest version. You can do this by running the following command:

pip install langflow -U

If you want to include pre-release versions, you can use:

pip install langflow -U --pre

After upgrading, try running Langflow again with the updated command:

langflow run --host 0.0.0.0 --port 7860

This should work with the latest version of Langflow [1].

To continue talking to Dosu, mention @dosu.

@kha84
Copy link
Author

kha84 commented Oct 16, 2024

nopes, looks like there's some kind of pip incompatibility hell is happening:

(langflow) user@magicbook14:~/Projects/Langflow$ python -m pip install langflow --pre -U
Requirement already satisfied: langflow in /home/user/miniconda3/envs/langflow/lib/python3.10/site-packages (1.0.9)
Collecting langflow
  Using cached langflow-1.0.19-py3-none-any.whl.metadata (8.0 kB)
Collecting assemblyai>=0.33.0 (from langflow)
  Using cached assemblyai-0.34.0-py3-none-any.whl.metadata (27 kB)
...
  Attempting uninstall: langflow-base
    Found existing installation: langflow-base 0.0.85
    Uninstalling langflow-base-0.0.85:
      Successfully uninstalled langflow-base-0.0.85
  Attempting uninstall: langflow
    Found existing installation: langflow 1.0.9
    Uninstalling langflow-1.0.9:
      Successfully uninstalled langflow-1.0.9
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
argilla 1.29.1 requires httpx<=0.26,>=0.15, but you have httpx 0.27.0 which is incompatible.
argilla 1.29.1 requires typer<0.10.0,>=0.6.0, but you have typer 0.12.5 which is incompatible.
Successfully installed aniso8601-8.1.1 assemblyai-0.34.0 astra-assistants-2.2.2 backports.tarfile-1.2.0 cassandra-driver-3.29.2 cassio-0.1.10 cattrs-24.1.2 clickhouse-connect-0.7.19 composio-core-0.5.9 composio-langchain-0.5.9 coolname-2.2.0 dataclasses-json-0.6.7 decorator-5.1.1 deepdiff-8.0.1 duckduckgo-search-6.3.2 e2b-1.0.1 e2b-code-interpreter-1.0.1 environs-9.5.0 frozendict-2.4.6 geomet-0.2.1.post1 gql-3.6.0b2 grandalf-0.8 graphene-3.0b7 graphql-core-3.3.0a6 graphql-relay-3.1.0 html5lib-1.1 huggingface-hub-0.25.2 inflection-0.5.1 jaraco.context-6.0.1 langchain-elasticsearch-0.2.2 langchain-google-community-1.0.7 langchain-milvus-0.1.6 langchain-mistralai-0.1.12 langchain-nvidia-ai-endpoints-0.1.6 langchain-openai-0.1.22 langchain-pinecone-0.1.3 langchain-unstructured-0.1.2 langflow-1.0.19 langflow-base-0.0.97 langwatch-0.1.30 lark-1.2.2 lsprotocol-2023.0.1 milvus-lite-2.4.10 more-itertools-10.5.0 multitasking-0.0.11 nanoid-2.0.0 orderly-set-5.2.2 pandas-2.2.2 paramiko-3.5.0 peewee-3.17.7 pinecone-client-5.0.1 pinecone-plugin-inference-1.1.0 pinecone-plugin-interface-0.0.7 primp-0.6.4 py-1.11.0 pydantic-settings-2.4.0 pymilvus-2.4.8 pynacl-1.5.0 pysher-1.0.8 python-lsp-jsonrpc-1.1.2 ragstack-ai-knowledge-store-0.2.1 redis-5.1.1 retry-0.9.2 ruff-0.6.9 semver-3.0.2 simsimd-5.7.1 spider-client-0.0.72 tenacity-8.3.0 tree-sitter-0.23.1 tree-sitter-python-0.23.2 unstructured-client-0.24.1 upstash-vector-0.6.0 webencodings-0.5.1 wolframalpha-5.1.3 xmltodict-0.14.2 yfinance-0.2.44

@kha84
Copy link
Author

kha84 commented Oct 16, 2024

What I did is - I dropped the messed-up conda environment:

conda deactivate
conda-env remove -n langflow

then recreated it from scratch, installing the latest available version of langflow and it worked straight away:

conda create -n langflow python=3.10
conda activate langflow
python -m pip install langflow --pre -U
python -m langflow run

Though I still see some minor issues upon startup (actually several hundreds lines of some sort of debug with some warnings and errors), but the web UI at least starting

@italojohnny italojohnny self-assigned this Oct 16, 2024
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

3 participants