How to fix pydantic_core._pydantic_core.ValidationError: 1 validation error in Python | DevErrors