Skip to content

General exception when trying to deserialize dict to dataclass #11

@DanielleFundbox

Description

@DanielleFundbox

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

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