sendinblue / APIv3-python-library

SendinBlue's python library for API v3
MIT License
82 stars 40 forks source link

Error when no IP is set for userUnsubscription #55

Closed frankie567 closed 4 years ago

frankie567 commented 4 years ago

Hi there,

When retrieving contact info with sib_api_v3_sdk.ContactsApi::get_contact_info method, I get the following error:

ValueError: Invalid value for `ip`, must not be `None`
  File "sib_api_v3_sdk/api/contacts_api.py", line 1145, in get_contact_info
    (data) = self.get_contact_info_with_http_info(email, **kwargs)  # noqa: E501
  File "sib_api_v3_sdk/api/contacts_api.py", line 1222, in get_contact_info_with_http_info
    collection_formats=collection_formats)
  File "sib_api_v3_sdk/api_client.py", line 330, in call_api
    _preload_content, _request_timeout)
  File "sib_api_v3_sdk/api_client.py", line 169, in __call_api
    return_data = self.deserialize(response_data, response_type)
  File "sib_api_v3_sdk/api_client.py", line 241, in deserialize
    return self.__deserialize(data, response_type)
  File "sib_api_v3_sdk/api_client.py", line 280, in __deserialize
    return self.__deserialize_model(data, klass)
  File "sib_api_v3_sdk/api_client.py", line 624, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "sib_api_v3_sdk/api_client.py", line 280, in __deserialize
    return self.__deserialize_model(data, klass)
  File "sib_api_v3_sdk/api_client.py", line 624, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "sib_api_v3_sdk/api_client.py", line 280, in __deserialize
    return self.__deserialize_model(data, klass)
  File "sib_api_v3_sdk/api_client.py", line 624, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "sib_api_v3_sdk/api_client.py", line 258, in __deserialize
    for sub_data in data]
  File "sib_api_v3_sdk/api_client.py", line 258, in <listcomp>
    for sub_data in data]
  File "sib_api_v3_sdk/api_client.py", line 280, in __deserialize
    return self.__deserialize_model(data, klass)
  File "sib_api_v3_sdk/api_client.py", line 626, in __deserialize_model
    instance = klass(**kwargs)
  File "sib_api_v3_sdk/models/get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.py", line 55, in __init__
    self.ip = ip
  File "sib_api_v3_sdk/models/get_extended_contact_details_statistics_unsubscriptions_user_unsubscription.py", line 128, in ip
    raise ValueError("Invalid value for `ip`, must not be `None`")  # noqa: E501

It seems that the Swagger specification expects ip to be a required parameter in the GetExtendedContactDetailsStatisticsUnsubscriptionsUserUnsubscription class ; but for this specific contact, it's not.

ruudy-sib commented 4 years ago

Hi @frankie567 The issue has been resolved. Please use the updated package from here Closing the issue. Thanks