Skip to content

member_profile recent_events.0.logo_url pydantic validation #73

@JDCodes

Description

@JDCodes

member_profile has logo_url with None which dont pass the validation.

get_career_data profile_data = ir.member_profile(driver_id)
in wrapper_function return wrapper(*args, **kwargs)
File ".venv\Lib\site-packages\pydantic_internal_validate_call.py", line 136, in call
res = self.pydantic_validator.validate_python(pydantic_core.ArgsKwargs(args, kwargs))
File ".venv\Lib\site-packages\iracingdataapi\client.py", line 1388, in member_profile
return self._validate_and_return(
~~~~~~~~~~~~~~~~~~~~~~~~~^
MemberProfileResponse,
^^^^^^^^^^^^^^^^^^^^^^
self._get_resource("/data/member/profile", payload=payload),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File ".venv\Lib\site-packages\iracingdataapi\client.py", line 160, in _validate_and_return
validated = TypeAdapter(klass).validate_python(data)
File ".venv\Lib\site-packages\pydantic\type_adapter.py", line 441, in validate_python
return self.validator.validate_python(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
object,
^^^^^^^
...<6 lines>...
by_name=by_name,
^^^^^^^^^^^^^^^^
)
^
pydantic_core._pydantic_core.ValidationError: 5 validation errors for MemberProfileResponse
recent_events.0.logo_url
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.12/v/string_type
recent_events.1.logo_url
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.12/v/string_type
recent_events.2.logo_url
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.12/v/string_type
recent_events.3.logo_url
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.12/v/string_type
recent_events.4.logo_url
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.12/v/string_type

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions