ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Error handling request Traceback (most recent call last): File "/home/ks/venv/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request resp = await request_handler(request)

Open kairin opened this issue 1 year ago • 1 comments

Your question

the last line of the error is this:


File "/usr/lib/python3.12/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

but something tells me it is probably in here where i should start but... i just dunno what to do.


Import times for custom nodes:
   0.0 seconds: /home/ks/comfui/custom_nodes/websocket_image_save.py

Starting server

To see the GUI go to: http://127.0.0.1:8188
Error handling request
Traceback (most recent call last):
  File "/home/ks/venv/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Logs

comfui  ddd  nodes  venv
Command 'nvcc' not found, but can be installed with:
sudo apt install nvidia-cuda-toolkit
Tue Oct 22 19:15:12 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.51.01              Driver Version: 565.90         CUDA Version: 12.7     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 4080 ...    On  |   00000000:0B:00.0  On |                  N/A |
|  0%   41C    P0             30W /  320W |     434MiB /  16376MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A        35      G   /Xwayland                                   N/A      |
+-----------------------------------------------------------------------------------------+
VIRTUAL_ENV=/home/ks/venv
VIRTUAL_ENV_PROMPT=(venv)
comfui  ddd  nodes  venv
CODEOWNERS       app               comfyui.prev2.log               fix_torch.py       models           pytest.ini        tests
CONTRIBUTING.md  comfy             comfyui_screenshot.png          folder_paths.py    new_updater.py   req.txt           tests-unit
LICENSE          comfy_execution   cuda_malloc.py                  input              node_helpers.py  requirements.txt  user
README.md        comfy_extras      custom_nodes                    latent_preview.py  nodes.py         script_examples   utils
__pycache__      comfyui.log       execution.py                    main.py            notebooks        server.py         web
api_server       comfyui.prev.log  extra_model_paths.yaml.example  model_filemanager  output           temp
  on    bash   ks 3.12.3    master ≡  ?1  1                                                                             0ms 
╭─ 19:15:13 |  22 Oct, Tuesday |   in     comfui
╰─❯ python main.py
Total VRAM 16376 MB, total RAM 40071 MB
pytorch version: 2.5.0+cu124
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4080 SUPER : cudaMallocAsync
Using pytorch cross attention
[Prompt Server] web root: /home/ks/comfui/web
/home/ks/venv/lib/python3.12/site-packages/kornia/feature/lightglue.py:44: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  @torch.cuda.amp.custom_fwd(cast_inputs=torch.float32)

Import times for custom nodes:
   0.0 seconds: /home/ks/comfui/custom_nodes/websocket_image_save.py

Starting server

To see the GUI go to: http://127.0.0.1:8188
Error handling request
Traceback (most recent call last):
  File "/home/ks/venv/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ks/venv/lib/python3.12/site-packages/aiohttp/web_app.py", line 559, in _handle
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ks/venv/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ks/comfui/server.py", line 63, in cache_control
    response: web.Response = await handler(request)
                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ks/comfui/server.py", line 141, in origin_only_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ks/comfui/app/app_settings.py", line 28, in get_settings
    return web.json_response(self.get_settings(request))
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ks/comfui/app/app_settings.py", line 15, in get_settings
    return json.load(f)
           ^^^^^^^^^^^^
  File "/usr/lib/python3.12/json/__init__.py", line 293, in load
    return loads(fp.read(),
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Other

i've removed al custom nodes... and honestly not sure where to start this time.

kairin avatar Oct 22 '24 11:10 kairin

Check the ComfyUI/user/default/comfy.settings.json file. It seems that the file is broken.

ltdrdata avatar Oct 22 '24 12:10 ltdrdata

mmmmm, i git clone comfyui into another folder instead... and check if it runs...

which it did... so it's not related to any other dependencies.

but when i ran micro to read the contents of the file... both in the old comfui folder and the new comf folder... both comfy.settings.json showed... empty...

image

image

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  on    bash   ks 3.12.3    master ≡  ?1  1                                                                           281ms 
╭─ 20:19:30 |  23 Oct, Wednesday |   in     comfui
╰─❯ ls
CODEOWNERS       app               comfyui.prev2.log               fix_torch.py       models           pytest.ini        tests
CONTRIBUTING.md  comfy             comfyui_screenshot.png          folder_paths.py    new_updater.py   req.txt           tests-unit
LICENSE          comfy_execution   cuda_malloc.py                  input              node_helpers.py  requirements.txt  user
README.md        comfy_extras      custom_nodes                    latent_preview.py  nodes.py         script_examples   utils
__pycache__      comfyui.log       execution.py                    main.py            notebooks        server.py         web
api_server       comfyui.prev.log  extra_model_paths.yaml.example  model_filemanager  output           temp
  on    bash   ks 3.12.3    master ≡  ?1  1                                                                             5ms 
╭─ 20:19:31 |  23 Oct, Wednesday |   in     comfui
╰─❯ cd ..
  on    bash                                                                                                                   4ms 
╭─ 20:19:34 |  23 Oct, Wednesday |   in  
╰─❯ ls
comfui  ddd  nodes  venv
  on    bash                                                                                                                   5ms 
╭─ 20:19:35 |  23 Oct, Wednesday |   in  
╰─❯ cd venv
  on    bash   ks 3.12.3                                                                                                     5ms 
╭─ 20:21:53 |  23 Oct, Wednesday |   in     venv
╰─❯ ls
bin  include  insightface  lib  lib64  pyvenv.cfg  share  tests
  on    bash   ks 3.12.3                                                                                                     7ms 
╭─ 20:21:54 |  23 Oct, Wednesday |   in     venv
╰─❯ git clone https://github.com/comfyanonymous/ComfyUI.git comf
Cloning into 'comf'...
remote: Enumerating objects: 14570, done.
remote: Counting objects: 100% (106/106), done.
remote: Compressing objects: 100% (75/75), done.
remote: Total 14570 (delta 51), reused 64 (delta 31), pack-reused 14464 (from 1)
Receiving objects: 100% (14570/14570), 26.65 MiB | 10.15 MiB/s, done.
Resolving deltas: 100% (9693/9693), done.
  on    bash   ks 3.12.3                                                                                                3s 821ms 
╭─ 20:23:35 |  23 Oct, Wednesday |   in     venv
╰─❯ cd ~
  on    bash                                                                                                                   4ms 
╭─ 20:25:03 |  23 Oct, Wednesday |   in  
╰─❯ ls
comfui  ddd  nodes  venv
  on    bash                                                                                                                   6ms 
╭─ 20:25:04 |  23 Oct, Wednesday |   in  
╰─❯ cd comfui
  on    bash   ks 3.12.3    master ≡  ?1  1                                                                             3ms 
╭─ 20:25:07 |  23 Oct, Wednesday |   in     comfui
╰─❯ ls
CODEOWNERS       app               comfyui.prev2.log               fix_torch.py       models           pytest.ini        tests
CONTRIBUTING.md  comfy             comfyui_screenshot.png          folder_paths.py    new_updater.py   req.txt           tests-unit
LICENSE          comfy_execution   cuda_malloc.py                  input              node_helpers.py  requirements.txt  user
README.md        comfy_extras      custom_nodes                    latent_preview.py  nodes.py         script_examples   utils
__pycache__      comfyui.log       execution.py                    main.py            notebooks        server.py         web
api_server       comfyui.prev.log  extra_model_paths.yaml.example  model_filemanager  output           temp
  on    bash   ks 3.12.3    master ≡  ?1  1                                                                             4ms 
╭─ 20:25:08 |  23 Oct, Wednesday |   in     comfui
╰─❯ cd user
  on    bash   ks 3.12.3    master ≡  ?1  1                                                                             4ms 
╭─ 20:25:46 |  23 Oct, Wednesday |   in     comfui  user
╰─❯ ls
default
  on    bash   ks 3.12.3    master ≡  ?1  1                                                                             6ms 
╭─ 20:25:47 |  23 Oct, Wednesday |   in     comfui  user
╰─❯ cd default
  on    bash   ks 3.12.3    master ≡  ?1  1                                                                             4ms 
╭─ 20:25:49 |  23 Oct, Wednesday |   in     comfui  user  default
╰─❯ ls
comfy.settings.json  comfy.templates.json  workflows
  on    bash   ks 3.12.3    master ≡  ?1  1                                                                             5ms 
╭─ 20:25:50 |  23 Oct, Wednesday |   in     comfui  user  default
╰─❯ micro comfy.settings.json
comfui  ddd  nodes  venv
  on    bash 
                                                 6ms 
╭─ 20:25:04 |  23 Oct, Wednesday |   in  
╰─❯ cd comfui
  on    bash   ks 3.12.3    master ≡  ?1  1 
                                                 3ms 
╭─ 20:25:07 |  23 Oct, Wednesday |   in     comfui
╰─❯ ls
CODEOWNERS       app               comfyui.prev2.log               fix_torch.py       models           pytest.ini        tests
CONTRIBUTING.md  comfy             comfyui_screenshot.png          folder_paths.py    new_updater.py   req.txt           tests-unit
LICENSE          comfy_execution   cuda_malloc.py                  input              node_helpers.py  requirements.txt  user
README.md        comfy_extras      custom_nodes                    latent_preview.py  nodes.py         script_examples   utils
__pycache__      comfyui.log       execution.py                    main.py            notebooks        server.py         web
api_server       comfyui.prev.log  extra_model_paths.yaml.example  model_filemanager  output           temp
  on    bash   ks 3.12.3    master ≡  ?1  1 
                                                 4ms 
╭─ 20:25:08 |  23 Oct, Wednesday |   in     comfui
╰─❯ cd user
  on    bash   ks 3.12.3    master ≡  ?1  1 
                                                 4ms 
╭─ 20:25:46 |  23 Oct, Wednesday |   in     comfui  user
╰─❯ ls
default
  on    bash   ks 3.12.3    master ≡  ?1  1 
                                                 6ms 
╭─ 20:25:47 |  23 Oct, Wednesday |   in     comfui  user
╰─❯ cd default
  on    bash   ks 3.12.3    master ≡  ?1  1 
                                                 4ms 
╭─ 20:25:49 |  23 Oct, Wednesday |   in     comfui  user  default
╰─❯ ls
comfy.settings.json  comfy.templates.json  workflows
  on    bash   ks 3.12.3    master ≡  ?1  1 
                                                 5ms 
╭─ 20:25:50 |  23 Oct, Wednesday |   in     comfui  user  default
╰─❯ micro comfy.settings.json
  on    bash   ks 3.12.3    master ≡  ?1  1              15s 180ms 
╭─ 20:31:37 |  23 Oct, Wednesday |   in     comfui  user  default
╰─❯

so i thought... should i just simply copy over the settings.json file? would it really do anything since both original and the newly installed one looks empty...

  on    bash   ks 3.12.3    master ≡  ?1  1                   71ms 
╭─ 20:28:54 |  23 Oct, Wednesday |   in     comfui  user  default
╰─❯ micro comfy.settings.json
  on    bash   ks 3.12.3    master ≡  ?1  1          11m 14s 115ms 
╭─ 20:40:16 |  23 Oct, Wednesday |   in     comfui  user  default
╰─❯ sudo cp comfy.settings.json ~/comfui/user/default/copy-comfy.settings.json
[sudo] password for ks:
  on    bash   ks 3.12.3    master ≡  ?1  1               2s 748ms 
╭─ 20:41:31 |  23 Oct, Wednesday |   in     comfui  user  default
╰─❯

okay so i did copied

image

╭─ 20:25:50 |  23 Oct, Wednesday |   in     comfui  user  default
╰─❯ micro comfy.settings.json
  on    bash   ks 3.12.3    master ≡  ?1  1              15s 180ms 
╭─ 20:31:37 |  23 Oct, Wednesday |   in     comfui  user  default
╰─❯ ls
comfy.settings.json  comfy.templates.json  copy-comfy.settings.json  workflows
  on    bash   ks 3.12.3    master ≡  ?1  1                    5ms 
╭─ 20:42:09 |  23 Oct, Wednesday |   in     comfui  user  default
╰─❯ sudo mv copy-comfy.settings.json comfy.settings.json
[sudo] password for ks:
  on    bash   ks 3.12.3    master ≡  ?1  1               2s 481ms 
╭─ 20:43:03 |  23 Oct, Wednesday |   in     comfui  user  default
╰─❯ ls
comfy.settings.json  comfy.templates.json  workflows
  on    bash   ks 3.12.3    master ≡  ?1  1                    5ms 
╭─ 20:43:02 |  23 Oct, Wednesday |   in     comfui  user  default
╰─❯

nope.. simply copying over the json file did not work.

image

it is probably easier if i just use the newly installed comfyui and just transfer my files over...

kairin avatar Oct 23 '24 12:10 kairin