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

"Install All Packages" button breaks due to error with http://127.0.0.1:8000/installed-dependencies #3056

Open
Arcitec opened this issue Dec 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Arcitec
Copy link

Arcitec commented Dec 6, 2024

Information:

  • Chainner version: 0f85bed
  • OS: Linux x64

Description
This happens on completely fresh installs (where there's no python/ venv dir yet).

The "Install All Packages" button breaks due to attempting to connect to http://127.0.0.1:8000/installed-dependencies, which errors with "Session is closed". This error is repeatedly spammed forever in the terminal.

As a result, nothing is being installed. The package download spinners spin forever, and no download progress is happening in the terminal or GUI.

Workaround

Clicking on a single package and installing just ONE package works properly, such as clicking on "Install PyTorch".

And after successfully installing a single package, THEN the "Install All Packages" button starts working too.

Logs

06:07:40.830 › Backend: [149326] [ERROR] Error installing dependencies: An error occurred while installing dependencies.
Traceback (most recent call last):
  File "chaiNNer-linux-x64/resources/src/server_host.py", line 315, in install_dependencies_request
    await install_dependencies(deps, progress, logger)
  File "chaiNNer-linux-x64/resources/src/dependencies/store.py", line 234, in install_dependencies
    raise ValueError("An error occurred while installing dependencies.")
ValueError: An error occurred while installing dependencies.
06:07:40.833 › Backend: [2024-12-06 06:07:40 +0100] [149326] [ERROR] Exception occurred while handling uri: 'http://127.0.0.1:8000/installed-dependencies'
Traceback (most recent call last):
  File "handle_request", line 97, in handle_request
    from sanic_ext.extensions.base import Extension  # type: ignore
                       ^^^^^^^^^^^^^^
  File "chaiNNer-linux-x64/resources/src/server_host.py", line 194, in get_installed_dependencies
    packages = await worker.get_packages()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "chaiNNer-linux-x64/resources/src/server_process_helper.py", line 269, in get_packages
    async with self._session.get(
  File "chaiNNer-linux-x64/python/python/lib/python3.11/site-packages/aiohttp/client.py", line 1194, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "chaiNNer-linux-x64/python/python/lib/python3.11/site-packages/aiohttp/client.py", line 425, in _request
    raise RuntimeError("Session is closed")
RuntimeError: Session is closed
06:07:40.839 › Error: The application encountered an unexpected error and could not continue.
    at kP.fromJson (file://chaiNNer-linux-x64/resources/app/.vite/renderer/main_window/index.js:398:4951)
    at Ine.fetchJson (file://chaiNNer-linux-x64/resources/app/.vite/renderer/main_window/index.js:398:5629)
    at async Object.queryFn (file://chaiNNer-linux-x64/resources/app/.vite/renderer/main_window/index.js:828:1396)
06:07:41.840 › Backend: [2024-12-06 06:07:41 +0100] [149326] [ERROR] Exception occurred while handling uri: 'http://127.0.0.1:8000/installed-dependencies'
Traceback (most recent call last):
  File "handle_request", line 97, in handle_request
    from sanic_ext.extensions.base import Extension  # type: ignore
                       ^^^^^^^^^^^^^^
  File "chaiNNer-linux-x64/resources/src/server_host.py", line 194, in get_installed_dependencies
    packages = await worker.get_packages()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "chaiNNer-linux-x64/resources/src/server_process_helper.py", line 269, in get_packages
    async with self._session.get(
  File "chaiNNer-linux-x64/python/python/lib/python3.11/site-packages/aiohttp/client.py", line 1194, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "chaiNNer-linux-x64/python/python/lib/python3.11/site-packages/aiohttp/client.py", line 425, in _request
    raise RuntimeError("Session is closed")
RuntimeError: Session is closed
06:07:41.841 › Error: The application encountered an unexpected error and could not continue.
    at kP.fromJson (file://chaiNNer-linux-x64/resources/app/.vite/renderer/main_window/index.js:398:4951)
    at Ine.fetchJson (file://chaiNNer-linux-x64/resources/app/.vite/renderer/main_window/index.js:398:5629)
    at async Object.queryFn (file://chaiNNer-linux-x64/resources/app/.vite/renderer/main_window/index.js:828:1396)
06:07:43.843 › Backend: [2024-12-06 06:07:43 +0100] [149326] [ERROR] Exception occurred while handling uri: 'http://127.0.0.1:8000/installed-dependencies'
Traceback (most recent call last):
  File "handle_request", line 97, in handle_request
    from sanic_ext.extensions.base import Extension  # type: ignore
                       ^^^^^^^^^^^^^^
  File "chaiNNer-linux-x64/resources/src/server_host.py", line 194, in get_installed_dependencies
    packages = await worker.get_packages()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "chaiNNer-linux-x64/resources/src/server_process_helper.py", line 269, in get_packages
    async with self._session.get(
  File "chaiNNer-linux-x64/python/python/lib/python3.11/site-packages/aiohttp/client.py", line 1194, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "chaiNNer-linux-x64/python/python/lib/python3.11/site-packages/aiohttp/client.py", line 425, in _request
    raise RuntimeError("Session is closed")
RuntimeError: Session is closed
06:07:43.844 › Error: The application encountered an unexpected error and could not continue.
    at kP.fromJson (file://chaiNNer-linux-x64/resources/app/.vite/renderer/main_window/index.js:398:4951)
    at Ine.fetchJson (file://chaiNNer-linux-x64/resources/app/.vite/renderer/main_window/index.js:398:5629)
    at async Object.queryFn (file://chaiNNer-linux-x64/resources/app/.vite/renderer/main_window/index.js:828:1396)
06:07:47.783 › Attempting to kill backend...
06:07:47.785 › Cleaning up temp folders...
06:07:47.788 › Successfully killed backend.
06:07:47.788 › Backend: [149326] [INFO] Closing server...
[2024-12-06 06:07:47 +0100] [149326] [INFO] Worker process stopped
[2024-12-06 06:07:47 +0100] [149326] [INFO] Stopping worker [149326]
@Arcitec Arcitec added the bug Something isn't working label Dec 6, 2024
@szotsaki
Copy link

szotsaki commented Dec 8, 2024

Can confirm. This is the beginning of the console log (with dependency conflict in it):

17:21:17.846 › Backend: [38451] [INFO] Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu121,https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
17:21:18.725 › Backend: [38451] [INFO] ERROR: Could not find a version that satisfies the requirement torch==2.1.2+cu121 (from versions: 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 2.5.0, 2.5.1)
17:21:18.725 › Backend: [38451] [INFO] ERROR: No matching distribution found for torch==2.1.2+cu121
17:21:18.781 › Backend: [38451] [ERROR] Error installing dependencies: An error occurred while installing dependencies.
Traceback (most recent call last):
  File "chaiNNer-linux-x64/resources/src/server_host.py", line 315, in install_dependencies_request
    await install_dependencies(deps, progress, logger)
  File "chaiNNer-linux-x64/resources/src/dependencies/store.py", line 234, in install_dependencies
    raise ValueError("An error occurred while installing dependencies.")
ValueError: An error occurred while installing dependencies.
17:21:18.785 › Backend: [2024-12-08 17:21:18 +0100] [38451] [ERROR] Exception occurred while handling uri: 'http://127.0.0.1:8000/installed-dependencies'
Traceback (most recent call last):
  File "handle_request", line 97, in handle_request
    from sanic_ext.extensions.base import Extension  # type: ignore
                       ^^^^^^^^^^^^^^
  File "chaiNNer-linux-x64/resources/src/server_host.py", line 194, in get_installed_dependencies
    packages = await worker.get_packages()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "chaiNNer-linux-x64/resources/src/server_process_helper.py", line 269, in get_packages
    async with self._session.get(
  File "chaiNNer-linux-x64/python/python/lib/python3.11/site-packages/aiohttp/client.py", line 1194, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "chaiNNer-linux-x64/python/python/lib/python3.11/site-packages/aiohttp/client.py", line 425, in _request
    raise RuntimeError("Session is closed")

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

2 participants