python-dataclasses-serialization
python-dataclasses-serialization copied to clipboard
General exception when trying to deserialize dict to dataclass
This code
return cls(**{
fld.name: deserialization_func(fld_type, dct[fld.name])
for fld, fld_type in zip(flds, fld_types)
if fld.name in dct
})
except TypeError:
raise DeserializationError("Missing one or more required fields to deserialize {!r} as {}".format(
dct,
cls
))
results with the same exception every time without specifying the problematic field or the field type