pydantic-ai icon indicating copy to clipboard operation
pydantic-ai copied to clipboard

TypeError: TypeAdapter.validate_json() got an unexpected keyword argument 'experimental_allow_partial'

Open boppanna-anil opened this issue 11 months ago • 4 comments

i am facing this issue : "TypeError: TypeAdapter.validate_json() got an unexpected keyword argument 'experimental_allow_partial'

is it library dependecy issue? please let me know

boppanna-anil avatar Dec 11 '24 01:12 boppanna-anil

Hi @boppanna-anil,

Could you please share the versions of pydantic and pydantic-core that you have installed? I'm guessing you need to update those...

sydney-runkle avatar Dec 11 '24 03:12 sydney-runkle

hi @sydney-runkle , thanks for you reply my versions are : pydantic == 2.10.3 pydantic-core == 2.27.1

boppanna-anil avatar Dec 11 '24 05:12 boppanna-anil

@boppanna-anil

Could you please provide an example? I am particularly interested in understanding the error you mentioned.

YanSte avatar Dec 11 '24 12:12 YanSte

Yeah, a repro would be great. We support experimental_allow_partial in validate_json, see:

https://github.com/pydantic/pydantic/blob/cc01258e6c19d42fa0230e922b939d5eb7c77492/pydantic/type_adapter.py#L420-L441

sydney-runkle avatar Dec 11 '24 13:12 sydney-runkle

@boppanna-anil you much be using an old version of Pydantic somehow, we definitely have that parameter in Pydantic.

samuelcolvin avatar Dec 11 '24 18:12 samuelcolvin

Going to close as resolved for now, but feel free to let us know if you're still experiencing this and send a repro.

sydney-runkle avatar Dec 11 '24 19:12 sydney-runkle