Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pickling `itk.PyBuffer` fails #1051

Open
jakirkham opened this issue Jul 1, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@jakirkham
Copy link
Member

commented Jul 1, 2019

Description

Trying to round-trip itk.PyBuffer through pickle fails. While it is possible to pickle itk.PyBuffer, it appears unpickling itk.PyBuffer results in an error.

Steps to Reproduce

import pickle
from itk import PyBuffer

pickle.loads(pickle.dumps(PyBuffer))

Expected behavior

The PyBuffer object is returned.

Actual behavior

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-561644876591> in <module>
----> 1 pickle.loads(pickle.dumps(PyBuffer))

TypeError: __new__() missing 1 required positional argument: 'name'

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

@jakirkham jakirkham added the type:Bug label Jul 1, 2019

@jakirkham

This comment has been minimized.

Copy link
Member Author

commented Jul 1, 2019

Also seeing this with other objects like itk.Image and itk.RichardsonLucyDeconvolutionImageFilter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.