INFO: 127.0.0.1:37506 - "GET /openapi.json HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/fastapi/applications.py", line 1106, in __call__
await super().__call__(scope, receive, send)
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/starlette/applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/starlette/middleware/errors.py", line 184, in __call__
raise exc
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/starlette/middleware/errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/starlette/middleware/cors.py", line 83, in __call__
await self.app(scope, receive, send)
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
raise exc
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
raise e
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
await self.app(scope, receive, send)
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/starlette/routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/fastapi/applications.py", line 1061, in openapi
return JSONResponse(self.openapi())
^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/fastapi/applications.py", line 1033, in openapi
self.openapi_schema = get_openapi(
^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/fastapi/openapi/utils.py", line 475, in get_openapi
field_mapping, definitions = get_definitions(
^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/fastapi/_compat.py", line 227, in get_definitions
field_mapping, definitions = schema_generator.generate_definitions(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 374, in generate_definitions
self.generate_inner(schema)
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 549, in generate_inner
json_schema = current_handler(schema)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/_internal/_schema_generation_shared.py", line 36, in __call__
return self.handler(__core_schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 523, in new_handler_func
json_schema = js_modify_function(schema_or_field, current_handler)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/main.py", line 601, in __get_pydantic_json_schema__
return __handler(__core_schema)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/_internal/_schema_generation_shared.py", line 36, in __call__
return self.handler(__core_schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 523, in new_handler_func
json_schema = js_modify_function(schema_or_field, current_handler)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/_internal/_generate_schema.py", line 212, in modify_model_json_schema
json_schema = handler(schema_or_field)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/_internal/_schema_generation_shared.py", line 36, in __call__
return self.handler(__core_schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 506, in handler_func
json_schema = generate_for_schema_type(schema_or_field)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 1318, in model_schema
json_schema = self.generate_inner(schema['schema'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 549, in generate_inner
json_schema = current_handler(schema)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/_internal/_schema_generation_shared.py", line 36, in __call__
return self.handler(__core_schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 506, in handler_func
json_schema = generate_for_schema_type(schema_or_field)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 1410, in model_fields_schema
json_schema = self._named_required_fields_schema(named_required_fields)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 1221, in _named_required_fields_schema
field_json_schema = self.generate_inner(field).copy()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 549, in generate_inner
json_schema = current_handler(schema)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/_internal/_schema_generation_shared.py", line 36, in __call__
return self.handler(__core_schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 541, in new_handler_func
json_schema = js_modify_function(schema_or_field, current_handler)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/_internal/_generate_schema.py", line 963, in json_schema_update_func
json_schema = {**handler(schema), **json_schema_updates}
^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/_internal/_schema_generation_shared.py", line 36, in __call__
return self.handler(__core_schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 506, in handler_func
json_schema = generate_for_schema_type(schema_or_field)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 1289, in model_field_schema
return self.generate_inner(schema['schema'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 549, in generate_inner
json_schema = current_handler(schema)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/_internal/_schema_generation_shared.py", line 36, in __call__
return self.handler(__core_schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 506, in handler_func
json_schema = generate_for_schema_type(schema_or_field)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 953, in function_plain_schema
return self._function_schema(schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 918, in _function_schema
return self.handle_invalid_for_json_schema(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/emmanuel/.cache/pypoetry/virtualenvs/parsec-cloud-fUS9rJbY-py3.12/lib/python3.12/site-packages/pydantic/json_schema.py", line 2069, in handle_invalid_for_json_schema
raise PydanticInvalidForJsonSchema(f'Cannot generate a JsonSchema for {error_info}')
pydantic.errors.PydanticInvalidForJsonSchema: Cannot generate a JsonSchema for core_schema.PlainValidatorFunctionSchema ({'type': 'no-info', 'function': <function <lambda> at 0x7adae29b3ba0>})
For further information visit https://errors.pydantic.dev/2.4/u/invalid-for-json-schema
Reproduce steps:
Comment https://github.com/Scille/parsec-cloud/blob/ae006046be448dde40183c7e19b0b8b20365207c/server/parsec/asgi/__init__.py#L31-L33
run
./make.py rts
curl http://127.0.0.1:6770/openapi.json
Should be fixed by #6344