Replies: 3 comments
-
@gotounix Those are old versions of both pydantic and fastapi -- try upgrading and see if the issue still exists. I can't test it now, but if you still run into the issue after upgrading, you may need to also inherit from class ModelName(str, Enum):
alexnet = "alexnet"
resnet = "resnet"
lenet = "lenet" |
Beta Was this translation helpful? Give feedback.
-
Thanks for your help @dmontagu ! 🍰 Thanks @gotounix for closing the issue. |
Beta Was this translation helpful? Give feedback.
-
I believe I'm encountering a similar issue (the error is nearly identical). I've tried using both:
and
in both scenarios I'm encountering this error: my environment: $pip freeze I've tried upgrading fastapi and pydantic, and I'm still continuing to run into the same issue. |
Beta Was this translation helpful? Give feedback.
-
I read the document and run the code in the documents.
But I have some problems that the result is not equal the document's result.
Such as:
1.Create an Enum class
I have errors while run it:
2.Query parameter list / multiple values with defaults
The result should be:
But I got:
I use Windows 10, and the env is:
Beta Was this translation helpful? Give feedback.
All reactions