Replies: 1 comment
-
Is there any way to fix this? I have the same issue and cannot find a way around |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Privileged issue
Issue Content
Python、Pydantic versions
pydantic version: 2.7.3
pydantic-core version: 2.18.4
fastapi 0.111.0
pydantic-core build: profile=release pgo=true
install path: /.venv/lib/python3.12/site-packages/pydantic
python version: 3.10.12
code error details
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\src\project\yjerp\ims\test.py", line 11, in
async def frontend_page(
File "D:\down_app\Anaconda3\envs\ims\lib\site-packages\fastapi\routing.py", line 944, in decorator
self.add_api_route(
File "D:\down_app\Anaconda3\envs\ims\lib\site-packages\fastapi\routing.py", line 883, in add_api_route
route = route_class(
File "D:\down_app\Anaconda3\envs\ims\lib\site-packages\fastapi\routing.py", line 513, in init
self.dependant = get_dependant(path=self.path_format, call=self.endpoint)
File "D:\down_app\Anaconda3\envs\ims\lib\site-packages\fastapi\dependencies\utils.py", line 261, in get_dependant
type_annotation, depends, param_field = analyze_param(
File "D:\down_app\Anaconda3\envs\ims\lib\site-packages\fastapi\dependencies\utils.py", line 444, in analyze_param
field = create_response_field(
File "D:\down_app\Anaconda3\envs\ims\lib\site-packages\fastapi\utils.py", line 99, in create_response_field
return ModelField(*kwargs) # type: ignore[arg-type]
File "", line 6, in init
File "D:\down_app\Anaconda3\envs\ims\lib\site-packages\fastapi_compat.py", line 120, in post_init
raise e
File "D:\down_app\Anaconda3\envs\ims\lib\site-packages\fastapi_compat.py", line 117, in post_init
self._type_adapter: TypeAdapter[Any] = TypeAdapter(ConfigStr)
File "D:\down_app\Anaconda3\envs\ims\lib\site-packages\pydantic\type_adapter.py", line 222, in init
validator = create_schema_validator(
File "D:\down_app\Anaconda3\envs\ims\lib\site-packages\pydantic\plugin_schema_validator.py", line 49, in create_schema_validator
return SchemaValidator(schema, config)
pydantic_core._pydantic_core.SchemaError: Error building "str" validator:
SchemaError: regex parse error:
^(?!/api/v1/).
^^^
error: look-around, including look-ahead and look-behind, is not supported
Beta Was this translation helpful? Give feedback.
All reactions