Skip to content

UnwrapError is not pickleable #200

Open
@indigoviolet

Description

In [38]: pickle.loads(pickle.dumps(UnwrapError(Err(None), 'foo')))
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[38], line 1
----> 1 pickle.loads(pickle.dumps(UnwrapError(Err(None), 'foo')))

TypeError: UnwrapError.__init__() missing 1 required positional argument: 'message'

The reason this matters is that sometimes you want exceptions to come back over process boundaries, for ex. while using multiprocessing.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions