AttributeError: module 'strawberry.experimental' has no attribute 'pydantic'

368 Views Asked by At

I recently upgraded to python 3.9.17 from 3.7.11 and changed poetry version to 1.3.2 . However I am getting errors when I am trying to run that application. I am using strawberry-gql too

However I am getting

AttributeError: module 'strawberry.experimental' has no attribute 'pydantic'

in the place where I have

@strawberry.experimental.pydantic.type(model=DsccError, all_fields=True)

Is pydantic moved to something else from experimental

1

There are 1 best solutions below

1
On BEST ANSWER

Yo, pydantic as moved to v2 with some breaking change, check your installed version and fallback to 1.10