InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: Internal Server Error when executing the download_queue

Open zpbrent opened this issue 1 year ago • 0 comments

Is there an existing issue for this problem?

  • [X] I have searched the existing issues

Operating system

Linux

GPU vendor

Nvidia (CUDA)

GPU model

No response

GPU VRAM

No response

Version number

v5.0.1

Browser

Chrome

Python dependencies

No response

What happened

When I send the HTTP POST /api/v1/download_queue/i/ with some dest, the server responds Internal Server Error. By further checking the debug logs, I see the error:

  File "/home/xxx/bug-bunty/InvokeAI-main/invokeAI_env/lib/python3.11/site-packages/invokeai/app/api/routers/download_queue.py", line 57, in download
    return queue.download(source, Path(dest), priority, access_token)
                                  ^^^^^^^^^^
  File "/home/xxx/bug-bunty/InvokeAI-main/invokeAI_env/lib/python3.11/site-packages/fastapi/param_functions.py", line 306, in Path
    return params.Path(
           ^^^^^^^^^^^^
  File "/home/xxx/bug-bunty/InvokeAI-main/invokeAI_env/lib/python3.11/site-packages/fastapi/params.py", line 185, in __init__
    assert default is ..., "Path parameters cannot have a default value"
           ^^^^^^^^^^^^^^
AssertionError: Path parameters cannot have a default value

It looks like the use of fastapi.Path to dest makes the function unable to work.

What you expected to happen

When POST /api/v1/download_queue/i/, it should be able to specify some dest as its destination to download.

How to reproduce the problem

No response

Additional context

No response

Discord username

No response

zpbrent avatar Oct 01 '24 18:10 zpbrent