Skip to content

Pickling the itk module fails #1050

Description

@jakirkham

Description

Pickling of the itk module fails.

Steps to Reproduce

import pickle
import itk                                                           

pickle.dumps(itk)

Expected behavior

Pickling succeeds.

Actual behavior

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-8fd95ab0c545> in <module>
----> 1 pickle.dumps(itk)

TypeError: can't pickle LazyITKModule objects

Reproducibility

Every time.

Versions

ITK 5.0.0 with some modules as 5.0.0.post1.

$ conda list itk
...
# Name                    Version                   Build  Channel
itk                       5.0.0                    py37_1    conda-forge
itk-core                  5.0.0.post1              pypi_0    pypi
itk-filtering             5.0.0.post1              pypi_0    pypi
itk-numerics              5.0.0.post1              pypi_0    pypi
itk-registration          5.0.0.post1              pypi_0    pypi
itk-segmentation          5.0.0.post1              pypi_0    pypi

Environment

Ubuntu 16.04.5 LTS (Xenial)
Python 3.7.3

Metadata

Metadata

Assignees

Labels

area:Python wrappingPython bindings for a classtype:BugInconsistencies or issues which will cause an incorrect result under some or all circumstances

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions