LLMStack icon indicating copy to clipboard operation
LLMStack copied to clipboard

Not able to install using pip

Open rpaasch opened this issue 1 year ago • 6 comments

Describe the bug After having tried for the past 24h... I give up. I'm not able to do a clean install of llmstack on neither Ubuntu, Debian or MacOS. Every time is try to start llmstack I get tons of errors.

To Reproduce

  1. Spin up a new DO or Vultr instance of Ubuntu, Debian or a new fresh install of MacOS.
  2. Log in as root (cause I got lazy from having tried so many times)
  3. Run "apt update && apt upgrade -y"
  4. Make sure python3, pip3, docker and "python-is-python3" are installed.
  5. Run "mv /usr/lib/python3.xx/EXTERNALLY-MANAGED /usr/lib/python3.xx/EXTERNALLY-MANAGED.old"
  6. Run "pip install llmstack"
  7. Everything breaks.

Expected behavior Llmstack installs using pip and takes care of dependencies as well as the setup of docker and runner-llmstack.

Version Latest.

Environment Ubuntu (20.04, 22.04 and 23.10), Debian (10x, 11x and 12x) and MacOS Sonona latest.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context root@vultr:~# llmstack /usr/local/lib/python3.11/dist-packages/llmstack/apps/apps.py:47: RuntimeWarning: coroutine 'SyncToAsync.call' was never awaited sync_to_async(add_missing_app_types)() RuntimeWarning: Enable tracemalloc to get the object allocation traceback /usr/local/lib/python3.11/dist-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported. warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning) Operations to perform: Apply all migrations: account, admin, apiabstractor, apps, auth, authtoken, base, contenttypes, datasources, django_rq, flags, jobs, organizations, sessions, sites, socialaccount Running migrations: No migrations to apply. Your models in app(s): 'organizations', 'socialaccount' have changes that are not yet reflected in a migration, and so won't be applied. Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them. Installed 39 object(s) from 1 fixture(s) Cache cleared successfully. [llmstack-runner] Starting LLMStack Runner Starting LLMStack rqworker Exception in thread Thread-1 (start_runner): Traceback (most recent call last): File "/usr/local/lib/python3.11/dist-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/urllib3/connectionpool.py", line 416, in _make_request conn.request(method, url, **httplib_request_kw) Waiting for LLMStack server to be up... File "/usr/local/lib/python3.11/dist-packages/urllib3/connection.py", line 244, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/usr/lib/python3.11/http/client.py", line 1282, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.11/http/client.py", line 1328, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.11/http/client.py", line 1277, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.11/http/client.py", line 1037, in _send_output self.send(msg) File "/usr/lib/python3.11/http/client.py", line 975, in send self.connect() File "/usr/local/lib/python3.11/dist-packages/docker/transport/unixconn.py", line 27, in connect sock.connect(self.unix_socket) FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.11/dist-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/usr/local/lib/python3.11/dist-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/urllib3/connectionpool.py", line 416, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/local/lib/python3.11/dist-packages/urllib3/connection.py", line 244, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/usr/lib/python3.11/http/client.py", line 1282, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.11/http/client.py", line 1328, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.11/http/client.py", line 1277, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.11/http/client.py", line 1037, in _send_output self.send(msg) File "/usr/lib/python3.11/http/client.py", line 975, in send self.connect() File "/usr/local/lib/python3.11/dist-packages/docker/transport/unixconn.py", line 27, in connect sock.connect(self.unix_socket) urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.11/dist-packages/docker/api/client.py", line 214, in _retrieve_server_version return self.version(api_version=False)["ApiVersion"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/docker/api/daemon.py", line 181, in version return self._result(self._get(url), json=True) ^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/docker/utils/decorators.py", line 46, in inner return f(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/docker/api/client.py", line 237, in _get return self.get(url, **self._set_request_timeout(kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/requests/sessions.py", line 602, in get return self.request("GET", url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/requests/adapters.py", line 501, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner self.run() File "/usr/lib/python3.11/threading.py", line 975, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.11/dist-packages/llmstack/cli.py", line 153, in start_runner client = docker.from_env() ^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/docker/client.py", line 96, in from_env return cls( ^^^^ File "/usr/local/lib/python3.11/dist-packages/docker/client.py", line 45, in init self.api = APIClient(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/docker/api/client.py", line 197, in init self._version = self._retrieve_server_version() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/docker/api/client.py", line 221, in _retrieve_server_version raise DockerException( docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) usage: llmstack [-h] [--host HOST] [--port PORT] {runserver,manage.py} ... llmstack: error: unrecognized arguments: rqworker default --verbosity=0 --with-scheduler Starting LLMStack Waiting for LLMStack server to be up... /usr/local/lib/python3.11/dist-packages/requests/structures.py:58: ResourceWarning: unclosed <socket.socket fd=11, family=1, type=1, proto=0> return (casedkey for casedkey, mappedvalue in self._store.values()) ResourceWarning: Enable tracemalloc to get the object allocation traceback Waiting for LLMStack server to be up... Waiting for LLMStack server to be up... Waiting for LLMStack server to be up... Waiting for LLMStack server to be up... Waiting for LLMStack server to be up... Waiting for LLMStack server to be up... /usr/local/lib/python3.11/dist-packages/llmstack/apps/apps.py:47: RuntimeWarning: coroutine 'SyncToAsync.call' was never awaited sync_to_async(add_missing_app_types)() RuntimeWarning: Enable tracemalloc to get the object allocation traceback /usr/local/lib/python3.11/dist-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported. warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning) Starting LLMStack Waiting for LLMStack server to be up... Waiting for LLMStack server to be up... Waiting for LLMStack server to be up... Waiting for LLMStack server to be up... Waiting for LLMStack server to be up... Waiting for LLMStack server to be up... Waiting for LLMStack server to be up... Waiting for LLMStack server to be up... /usr/local/lib/python3.11/dist-packages/llmstack/apps/apps.py:47: RuntimeWarning: coroutine 'SyncToAsync.call' was never awaited sync_to_async(add_missing_app_types)() RuntimeWarning: Enable tracemalloc to get the object allocation traceback /usr/local/lib/python3.11/dist-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported. warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning) Performing system checks...

Waiting for LLMStack server to be up... System check identified no issues (0 silenced). March 04, 2024 - 15:53:46 Django version 5.0, using settings 'llmstack.server.settings' Starting ASGI/Daphne version 4.1.0 development server at http://127.0.0.1:3010/ Quit the server with CONTROL-C.

rpaasch avatar Mar 04 '24 16:03 rpaasch

Seriously? No one other that me is experiencing this behavior?

rpaasch avatar Mar 21 '24 09:03 rpaasch

Cannot start llmstack either.

Running pip install llmstack gives the following somewhere in the middle:

...
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.
jupyterlab 4.1.5 requires httpx>=0.25.0, but you have httpx 0.23.3 which is incompatible.
...

But it seems to install fine otherwise.

Then running llmstack gives:

It looks like you are running LLMStack for the first time. Please provide the following information:

Enter admin username: (default: admin) 
Enter admin email: 
Enter admin password: (default: promptly) 
Enter default OpenAI API key: (Leave empty to configure in settings later)
Traceback (most recent call last):
  File "/home/codespace/.python/current/bin/llmstack", line 8, in <module>
    sys.exit(main())
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/llmstack/cli.py", line 308, in main
    run_django_command(["manage.py", "migrate", "--noinput"])
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/llmstack/cli.py", line 18, in run_django_command
    execute_from_command_line(command)
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/django/core/management/__init__.py", line 416, in execute
    django.setup()
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/usr/local/python/3.10.13/lib/python3.10/site-packages/django/apps/config.py", line 193, in create
    import_module(entry)
  File "/usr/local/python/3.10.13/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'rest_framework'

CheeseDurger avatar Apr 19 '24 16:04 CheeseDurger

Facing huge error in MacOS. @ajhai Please check.

Traceback (most recent call last): File "/opt/homebrew/bin/llmstack", line 8, in sys.exit(main()) ^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/llmstack/cli.py", line 308, in main run_django_command(["manage.py", "migrate", "--noinput"]) File "/opt/homebrew/lib/python3.11/site-packages/llmstack/cli.py", line 18, in run_django_command execute_from_command_line(command) File "/opt/homebrew/lib/python3.11/site-packages/django/core/management/init.py", line 442, in execute_from_command_line utility.execute() File "/opt/homebrew/lib/python3.11/site-packages/django/core/management/init.py", line 416, in execute django.setup() File "/opt/homebrew/lib/python3.11/site-packages/django/init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/opt/homebrew/lib/python3.11/site-packages/django/apps/registry.py", line 124, in populate app_config.ready() File "/opt/homebrew/lib/python3.11/site-packages/llmstack/processors/apps.py", line 32, in ready load_processor_subclasses() File "/opt/homebrew/lib/python3.11/site-packages/llmstack/processors/apps.py", line 17, in load_processor_subclasses subclasses.extend(get_all_sub_classes(package, ApiProcessorInterface)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/llmstack/common/utils/module_loader.py", line 27, in get_all_sub_classes class_module = importlib.import_module( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/[email protected]/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/opt/homebrew/lib/python3.11/site-packages/llmstack/processors/providers/openai/audio_transcription.py", line 9, in from llmstack.common.utils.utils import validate_parse_data_uri File "/opt/homebrew/lib/python3.11/site-packages/llmstack/common/utils/utils.py", line 15, in from llmstack.common.utils.crawlers import ( File "/opt/homebrew/lib/python3.11/site-packages/llmstack/common/utils/crawlers.py", line 20, in from unstructured.partition.auto import partition_html File "/opt/homebrew/lib/python3.11/site-packages/unstructured/partition/auto.py", line 80, in from unstructured.partition.pdf import partition_pdf File "/opt/homebrew/lib/python3.11/site-packages/unstructured/partition/pdf.py", line 75, in from unstructured.partition.ocr import ( File "/opt/homebrew/lib/python3.11/site-packages/unstructured/partition/ocr.py", line 17, in from unstructured_inference.inference.layout import DocumentLayout, PageLayout File "/opt/homebrew/lib/python3.11/site-packages/unstructured_inference/inference/layout.py", line 27, in from unstructured_inference.models.base import get_model File "/opt/homebrew/lib/python3.11/site-packages/unstructured_inference/models/base.py", line 3, in from unstructured_inference.models.chipper import MODEL_TYPES as CHIPPER_MODEL_TYPES File "/opt/homebrew/lib/python3.11/site-packages/unstructured_inference/models/chipper.py", line 10, in import transformers File "/opt/homebrew/lib/python3.11/site-packages/transformers/init.py", line 26, in from . import dependency_versions_check File "/opt/homebrew/lib/python3.11/site-packages/transformers/dependency_versions_check.py", line 57, in require_version_core(deps[pkg]) File "/opt/homebrew/lib/python3.11/site-packages/transformers/utils/versions.py", line 117, in require_version_core return require_version(requirement, hint) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/transformers/utils/versions.py", line 111, in require_version _compare_versions(op, got_ver, want_ver, requirement, pkg, hint) File "/opt/homebrew/lib/python3.11/site-packages/transformers/utils/versions.py", line 39, in _compare_versions raise ValueError( ValueError: Unable to compare versions for packaging>=20.0: need=20.0 found=None. This is unusual. Consider reinstalling packaging.

jimiopex avatar Apr 21 '24 12:04 jimiopex

pip install llmstack is just broken... team please react to this issue.

@CheeseDurger here is the solution to your problem. Install all the packages mentioned in the comment to the accepted answer please. https://stackoverflow.com/questions/78346593/modulenotfounderror-no-module-named-flags-state-flags-is-not-a-package?noredirect=1#comment138122870_78346593

MichalStepwise avatar Apr 22 '24 10:04 MichalStepwise

Seriously? No one other that me is experiencing this behavior?

Yes I have same issue after installing with pip install llmstack when you run llmstack it starts with the following error that is not understandable :

llmstack                                                                                                                                                                                                                ─╯
/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/llmstack/apps/apps.py:47: RuntimeWarning: coroutine 'SyncToAsync.__call__' was never awaited
  sync_to_async(add_missing_app_types)()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
  warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)
Operations to perform:
  Apply all migrations: account, admin, apiabstractor, apps, auth, authtoken, base, contenttypes, datasources, django_rq, flags, jobs, organizations, sessions, sites, socialaccount
Running migrations:
  No migrations to apply.
  Your models in app(s): 'organizations', 'socialaccount' have changes that are not yet reflected in a migration, and so won't be applied.
  Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
Installed 39 object(s) from 1 fixture(s)
Cache cleared successfully.
[llmstack-runner] Starting LLMStack Runner
Starting LLMStack rqworker
Exception in thread Thread-1 (start_runner):
Traceback (most recent call last):
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/urllib3/connectionpool.py", line 715, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/urllib3/connectionpool.py", line 416, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/urllib3/connection.py", line 244, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/Users/l028/.pyenv/versions/3.11.8/lib/python3.11/http/client.py", line 1298, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/Users/l028/.pyenv/versions/3.11.8/lib/python3.11/http/client.py", line 1344, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/Users/l028/.pyenv/versions/3.11.8/lib/python3.11/http/client.py", line 1293, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/Users/l028/.pyenv/versions/3.11.8/lib/python3.11/http/client.py", line 1052, in _send_output
    self.send(msg)
  File "/Users/l028/.pyenv/versions/3.11.8/lib/python3.11/http/client.py", line 990, in send
    self.connect()
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/docker/transport/unixconn.py", line 27, in connect
    sock.connect(self.unix_socket)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/urllib3/connectionpool.py", line 799, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/urllib3/util/retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/urllib3/packages/six.py", line 769, in reraise
Waiting for LLMStack server to be up...
    raise value.with_traceback(tb)
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/urllib3/connectionpool.py", line 715, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/urllib3/connectionpool.py", line 416, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/urllib3/connection.py", line 244, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/Users/l028/.pyenv/versions/3.11.8/lib/python3.11/http/client.py", line 1298, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/Users/l028/.pyenv/versions/3.11.8/lib/python3.11/http/client.py", line 1344, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/Users/l028/.pyenv/versions/3.11.8/lib/python3.11/http/client.py", line 1293, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/Users/l028/.pyenv/versions/3.11.8/lib/python3.11/http/client.py", line 1052, in _send_output
    self.send(msg)
  File "/Users/l028/.pyenv/versions/3.11.8/lib/python3.11/http/client.py", line 990, in send
    self.connect()
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/docker/transport/unixconn.py", line 27, in connect
    sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/docker/api/client.py", line 214, in _retrieve_server_version
    return self.version(api_version=False)["ApiVersion"]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/docker/api/daemon.py", line 181, in version
    return self._result(self._get(url), json=True)
                        ^^^^^^^^^^^^^^
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/docker/utils/decorators.py", line 46, in inner
    return f(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/docker/api/client.py", line 237, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/requests/adapters.py", line 501, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/l028/.pyenv/versions/3.11.8/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/Users/l028/.pyenv/versions/3.11.8/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/llmstack/cli.py", line 153, in start_runner
    client = docker.from_env()
             ^^^^^^^^^^^^^^^^^
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/docker/client.py", line 96, in from_env
    return cls(
           ^^^^
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/docker/client.py", line 45, in __init__
    self.api = APIClient(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/docker/api/client.py", line 197, in __init__
    self._version = self._retrieve_server_version()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/docker/api/client.py", line 221, in _retrieve_server_version
    raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
Starting LLMStack
Waiting for LLMStack server to be up...
/Users/l028/.pyenv/versions/3.11.8/lib/python3.11/http/cookiejar.py:1229: ResourceWarning: unclosed <socket.socket fd=14, family=1, type=1, proto=0>
  for obj in list(mapping.values()):
ResourceWarning: Enable tracemalloc to get the object allocation traceback
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/llmstack/apps/apps.py:47: RuntimeWarning: coroutine 'SyncToAsync.__call__' was never awaited
  sync_to_async(add_missing_app_types)()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/llmstack/apps/apps.py:47: RuntimeWarning: coroutine 'SyncToAsync.__call__' was never awaited
  sync_to_async(add_missing_app_types)()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
  warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)
/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
  warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)
Error 61 connecting to localhost:50379. Connection refused.
Starting LLMStack
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
Waiting for LLMStack server to be up...
/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/llmstack/apps/apps.py:47: RuntimeWarning: coroutine 'SyncToAsync.__call__' was never awaited
  sync_to_async(add_missing_app_types)()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
/Users/l028/.pyenv/versions/3.11.8/envs/llm_stack/lib/python3.11/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
  warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)
Performing system checks...

System check identified no issues (0 silenced).
April 22, 2024 - 10:34:49
Django version 5.0.4, using settings 'llmstack.server.settings'
Starting ASGI/Daphne version 4.1.2 development server at http://127.0.0.1:3000/
Quit the server with CONTROL-C.

LLMStack team any ideas what is the issue here?

MichalStepwise avatar Apr 22 '24 10:04 MichalStepwise

I have given up. There are so many other alternatives out there. It's not worth my time. I use Dify.ai instead: https://github.com/langgenius/dify

rpaasch avatar Apr 22 '24 10:04 rpaasch

This should now be fixed with the latest release.

ajhai avatar May 21 '24 09:05 ajhai