Eduardo Romero López
08/14/2023, 11:18 AMINFO: Started server process [128335]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on <http://0.0.0.0:8000> (Press CTRL+C to quit)
INFO: 127.0.0.1:40112 - "GET / HTTP/1.1" 307 Temporary Redirect
INFO: 127.0.0.1:40112 - "GET /docs HTTP/1.1" 200 OK
INFO: 127.0.0.1:40112 - "GET /openapi.json HTTP/1.1" 200 OK
INFO: 127.0.0.1:48892 - "GET / HTTP/1.1" 307 Temporary Redirect
INFO: 127.0.0.1:48892 - "GET /docs HTTP/1.1" 200 OK
INFO: 127.0.0.1:48892 - "GET /openapi.json HTTP/1.1" 200 OK
INFO: 127.0.0.1:48896 - "GET /my_model?sepal_length=4&sepal_width=3&petal_length=2&petal_width=1 HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/fastapi/encoders.py", line 152, in jsonable_encoder
data = dict(obj)
ValueError: dictionary update sequence element #0 has length 6; 2 is required
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/fastapi/encoders.py", line 157, in jsonable_encoder
data = vars(obj)
TypeError: vars() argument must have __dict__ attribute
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
return await <http://self.app|self.app>(scope, receive, send)
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/fastapi/applications.py", line 276, in __call__
await super().__call__(scope, receive, send)
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/starlette/applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in __call__
raise exc
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__
await <http://self.app|self.app>(scope, receive, _send)
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
raise exc
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
await <http://self.app|self.app>(scope, receive, sender)
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
raise e
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
await <http://self.app|self.app>(scope, receive, send)
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/starlette/routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
await <http://self.app|self.app>(scope, receive, send)
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/fastapi/routing.py", line 255, in app
content = await serialize_response(
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/fastapi/routing.py", line 152, in serialize_response
return jsonable_encoder(response_content)
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/fastapi/encoders.py", line 117, in jsonable_encoder
encoded_value = jsonable_encoder(
File "/home/coder/miniconda3/envs/demml/lib/python3.10/site-packages/fastapi/encoders.py", line 160, in jsonable_encoder
raise ValueError(errors) from e
ValueError: [ValueError('dictionary update sequence element #0 has length 6; 2 is required'), TypeError('vars() argument must have __dict__ attribute')]
Deepyaman Datta
08/14/2023, 1:13 PMkedro-fast-api
(as it's a third-party plugin), but looks cool, and maybe you can make a PR with the fix over there. 🙂