ai-dock / comfyui

ComfyUI docker images for use in GPU cloud and local environments. Includes AI-Dock base for authentication and improved user experience.
Other
609 stars 219 forks source link

Get error `NameError: name 'request_queue' is not defined. Did you mean: 'request_store'?` while making a `queue-info` API call #105

Open JaxDoge opened 1 month ago

JaxDoge commented 1 month ago

The server returned 500 error when I tried to test the API call to my local server.

The uvicorn package return: NameError: name 'request_queue' is not defined. Did you mean: 'request_store'?

supervisor-1  | ==> /var/log/supervisor/comfyui-api-wrapper.log <==
supervisor-1  | INFO:     172.18.0.1:0 - "GET /queue-info HTTP/1.1" 500 Internal Server Error
supervisor-1  | ERROR:    Exception in ASGI application
supervisor-1  | Traceback (most recent call last):
supervisor-1  |   File "/opt/environments/python/api/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 419, in run_asgi
supervisor-1  |     result = await app(  # type: ignore[func-returns-value]
supervisor-1  |   File "/opt/environments/python/api/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
supervisor-1  |     return await self.app(scope, receive, send)
supervisor-1  |   File "/opt/environments/python/api/lib/python3.10/site-packages/fastapi/applications.py", line 292, in __call__
supervisor-1  |     await super().__call__(scope, receive, send)
supervisor-1  |   File "/opt/environments/python/api/lib/python3.10/site-packages/starlette/applications.py", line 122, in __call__
supervisor-1  |     await self.middleware_stack(scope, receive, send)
supervisor-1  |   File "/opt/environments/python/api/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in __call__
supervisor-1  |     raise exc
supervisor-1  |   File "/opt/environments/python/api/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__
supervisor-1  |     await self.app(scope, receive, _send)
supervisor-1  |   File "/opt/environments/python/api/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
supervisor-1  |     raise exc
supervisor-1  |   File "/opt/environments/python/api/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
supervisor-1  |     await self.app(scope, receive, sender)
supervisor-1  |   File "/opt/environments/python/api/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
supervisor-1  |     raise e
supervisor-1  |   File "/opt/environments/python/api/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
supervisor-1  |     await self.app(scope, receive, send)
supervisor-1  |   File "/opt/environments/python/api/lib/python3.10/site-packages/starlette/routing.py", line 718, in __call__
supervisor-1  |     await route.handle(scope, receive, send)
supervisor-1  |   File "/opt/environments/python/api/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
supervisor-1  |     await self.app(scope, receive, send)
supervisor-1  |   File "/opt/environments/python/api/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
supervisor-1  |     response = await func(request)
supervisor-1  |   File "/opt/environments/python/api/lib/python3.10/site-packages/fastapi/routing.py", line 273, in app
supervisor-1  |     raw_response = await run_endpoint_function(
supervisor-1  |   File "/opt/environments/python/api/lib/python3.10/site-packages/fastapi/routing.py", line 190, in run_endpoint_function
supervisor-1  |     return await dependant.call(**values)
supervisor-1  |   File "/opt/ai-dock/api-wrapper/main.py", line 96, in queue_info
supervisor-1  |     return list(request_queue.queue)
supervisor-1  | NameError: name 'request_queue' is not defined. Did you mean: 'request_store'?
robballantyne commented 1 month ago

Hi, I'll look at this soon.

The API wrapper isn't finished, as I haven't had much time to work on any of the AI-Dock repos for a few weeks. There's a good chance some fixes are required and the webhooks and telemetry haven't been implemented at all.

Should be good to go in a couple of weeks, after which I'll be making everything more modular as I focus more on docker compose support.