jina-ai / serve

☁️ Build multimodal AI applications with cloud-native stack
https://jina.ai/serve
Apache License 2.0
21.13k stars 2.22k forks source link

CLI jina does not respond #4699

Closed nick-konovalchuk closed 2 years ago

nick-konovalchuk commented 2 years ago

Describe the bug Running Jina CLI results in no output, but the terminal is never released like it's running an infinite loop or waiting for a respose After reloading the PC I got jina through once with tens of DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. Next time I've run anything from CLI I once again got no output but the terminal is still not released for like 10-15 minutes Killing it with ctrl+C gives(if it's helpful at all):

^CTraceback (most recent call last):
  File "/home/ITRANSITION.CORP/n.konovalchuk/test_projects/jina_issues/venv/bin/jina", line 8, in <module>
    sys.exit(main())
  File "/home/ITRANSITION.CORP/n.konovalchuk/test_projects/jina_issues/venv/lib/python3.8/site-packages/cli/__init__.py", line 203, in main
    args = _get_run_args()
  File "/home/ITRANSITION.CORP/n.konovalchuk/test_projects/jina_issues/venv/lib/python3.8/site-packages/cli/__init__.py", line 10, in _get_run_args
    from jina.helper import get_rich_console
  File "/home/ITRANSITION.CORP/n.konovalchuk/test_projects/jina_issues/venv/lib/python3.8/site-packages/jina/__init__.py", line 17, in <module>
    import docarray as _docarray
  File "/home/ITRANSITION.CORP/n.konovalchuk/test_projects/jina_issues/venv/lib/python3.8/site-packages/docarray/__init__.py", line 5, in <module>
    from .document import Document
  File "/home/ITRANSITION.CORP/n.konovalchuk/test_projects/jina_issues/venv/lib/python3.8/site-packages/docarray/document/__init__.py", line 4, in <module>
    from .mixins import AllMixins
  File "/home/ITRANSITION.CORP/n.konovalchuk/test_projects/jina_issues/venv/lib/python3.8/site-packages/docarray/document/mixins/__init__.py", line 1, in <module>
    from .attribute import GetAttributesMixin
  File "/home/ITRANSITION.CORP/n.konovalchuk/test_projects/jina_issues/venv/lib/python3.8/site-packages/docarray/document/mixins/attribute.py", line 3, in <module>
    from ...helper import dunder_get
  File "/home/ITRANSITION.CORP/n.konovalchuk/test_projects/jina_issues/venv/lib/python3.8/site-packages/docarray/helper.py", line 9, in <module>
    from distutils.version import LooseVersion
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 914, in _find_spec
  File "/home/ITRANSITION.CORP/n.konovalchuk/test_projects/jina_issues/venv/lib/python3.8/site-packages/_distutils_hack/__init__.py", line 83, in find_spec
    return method()
  File "/home/ITRANSITION.CORP/n.konovalchuk/test_projects/jina_issues/venv/lib/python3.8/site-packages/_distutils_hack/__init__.py", line 90, in spec_for_distutils
    mod = importlib.import_module('setuptools._distutils')
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/ITRANSITION.CORP/n.konovalchuk/test_projects/jina_issues/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 16, in <module>
    import setuptools.version
  File "/home/ITRANSITION.CORP/n.konovalchuk/test_projects/jina_issues/venv/lib/python3.8/site-packages/setuptools/version.py", line 1, in <module>
    import pkg_resources
  File "<frozen importlib._bootstrap>", line 202, in _lock_unlock_module
  File "<frozen importlib._bootstrap>", line 98, in acquire
KeyboardInterrupt

Jina CLI still works properly in another project, so there're some details on my system and python version

- jina 3.3.6
- docarray 0.12.9
- jina-proto 0.1.8
- jina-vcs-tag (unset)
- protobuf 3.20.1
- proto-backend cpp
- grpcio 1.44.0
- pyyaml 6.0
- python 3.8.10
- platform Linux
- platform-release 5.13.0-40-generic
- platform-version #45~20.04.1-Ubuntu SMP Mon Apr 4 09:38:31 UTC 2022
- architecture x86_64
- processor x86_64
- uid 212950098113529
- session-id a731d64d-c5f4-11ec-ae3e-c1ad4ef3f3f9
- uptime 2022-04-27T09:38:30.871335
- ci-vendor (unset)
* JINA_ARRAY_QUANT (unset)
* JINA_CONTROL_PORT (unset)
* JINA_DEFAULT_HOST (unset)
* JINA_DEFAULT_TIMEOUT_CTRL (unset)
* JINA_DISABLE_UVLOOP (unset)
* JINA_FULL_CLI (unset)
* JINA_HUBBLE_REGISTRY (unset)
* JINA_HUB_CACHE_DIR (unset)
* JINA_HUB_ROOT (unset)
* JINA_GATEWAY_IMAGE (unset)
* JINA_LOG_CONFIG (unset)
* JINA_LOG_LEVEL (unset)
* JINA_LOG_NO_COLOR (unset)
* JINA_LOG_WORKSPACE (unset)
* JINA_MP_START_METHOD (unset)
* JINA_OPTIMIZER_TRIAL_WORKSPACE(unset)
* JINA_DEPLOYMENT_NAME (unset)
* JINA_RANDOM_PORT_MAX (unset)
* JINA_RANDOM_PORT_MIN (unset)
* JINA_VCS_VERSION (unset)

Environment Empty PyCharm project with requirements.txt:

jina==3.3.11
Pillow==9.1.0
nick-konovalchuk commented 2 years ago

Well, i've just created a new virtual environment with Python 3.8.10, ran pip install jina==3.3.11 and reproduced the bug

nick-konovalchuk commented 2 years ago

Everything I did above was from PyCharm. I've created a venv with terminal, installed jina and everything's fine. Should I close the issue?

JoanFM commented 2 years ago

I close the issue as mentioned here