-
Notifications
You must be signed in to change notification settings - Fork 138
Closed
Labels
kind/bugSomething isn't workingSomething isn't workingstaleIssue marked as stale by Dapr BotIssue marked as stale by Dapr Bot
Milestone
Description
Expected Behavior
Open dapr fastapi ext doc, copy paste example and make it work
Actual Behavior
Pydantic refuses example:
== APP == Traceback (most recent call last):
== APP == File "/home/jse/python-sdk/test.py", line 9, in <module>
== APP == class User(BaseModel):
== APP == File "/home/jse/python-sdk/venv/lib/python3.10/site-packages/pydantic/_internal/_model_construction.py", line 113, in __new__
== APP == private_attributes = inspect_namespace(
== APP == File "/home/jse/python-sdk/venv/lib/python3.10/site-packages/pydantic/_internal/_model_construction.py", line 450, in inspect_namespace
== APP == raise PydanticUserError(
== APP == pydantic.errors.PydanticUserError: A non-annotated attribute was detected: `name = 'Jane Doe'`. All model fields require a type annotation; if `name` is not meant to be a field, you may be able to resolve this error by annotating it as a `ClassVar` or updating `model_config['ignored_types']`.
== APP ==
== APP == For further information visit https://errors.pydantic.dev/2.10/u/model-field-missing-annotationSteps to Reproduce the Problem
Copy paste example and run
Release Note
Release note not applicable I think.
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't workingSomething isn't workingstaleIssue marked as stale by Dapr BotIssue marked as stale by Dapr Bot