Bug: Python SDK encountering an error with optional nullable date/time fields, resulting in failed unmarshalling of data
TLDR:
The presence of the stringย `__SPEAKEASY_UNSET__`ย in a field expected to contain a date is causing errors in the Python SDK.
@Andre Rabold said:
> Good morning! it seems since last week Iโm running into a new problem with the Python SDK when dealing with optional nullable (?) date/time fields. The unmarshalling of the data fails with the call stack below. The offending data/time fields are not set but completely excluded from the response.
>
> ```
> File "/opt/anaconda3/lib/python3.11/site-packages/autounify/utils/utils.py", line 825, in unmarshal_json
> out = unmarshal.from_dict({"res": json_dict}, infer_missing=infer_missing)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/opt/anaconda3/lib/python3.11/site-packages/dataclasses_json/api.py", line 70, in from_dict
> return _decode_dataclass(cls, kvs, infer_missing)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/opt/anaconda3/lib/python3.11/site-packages/dataclasses_json/core.py", line 233, in _decode_dataclass
> init_kwargs[field.name] = _decode_generic(field_type,
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/opt/anaconda3/lib/python3.11/site-packages/dataclasses_json/core.py", line 329, in _decode_generic
> res = _decode_type(type_arg, value, infer_missing)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/opt/anaconda3/lib/python3.11/site-packages/dataclasses_json/core.py", line 247, in _decode_type
> return _decode_generic(type_, value, infer_missing)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/opt/anaconda3/lib/python3.11/site-packages/dataclass...
> ```