You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
This discussion was converted from issue #11755 on June 24, 2024 16:57.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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