Closed intellectoglobal closed 1 year ago
I tested it in 3.9 it working, I will test it again with 3.10
This looks like a pydantic issue -- I assume you're using pydantic 2 rather than pydantic 1? Kor is not pydantic v2 compatible yet
you're right, it was pydantic v2.2 was causing the issue and then I downgraded it to 1.10, it started working
attributeError Traceback (most recent call last)
Cell In[12], line 1
----> 1 testschema, test_validator = from_pydantic(
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/kor/adapters.py:151, in from_pydantic(model_class, description, examples, many)
(...)
(...)
--> 151 schema = _translate_pydantic_to_kor(
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/kor/adapters.py:51, in _translate_pydantic_to_kor(model_class, name, description, examples, many)
---> 51 field_info = field.field_info
AttributeError: 'FieldInfo' object has no attribute 'field_info'
my code : something wrong with model : class Test(BaseModel): abc: str = Field( ..., description="test.", examples=[