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 imshow fails (?due to _imcache) #3614

Closed
mfitzp opened this issue Oct 3, 2014 · 1 comment
Closed

Pickling imshow fails (?due to _imcache) #3614

mfitzp opened this issue Oct 3, 2014 · 1 comment
Milestone

Comments

@mfitzp
Copy link
Member

mfitzp commented Oct 3, 2014

Pickling imshow objects (I'm using them used for heatmaps) fails with the following error in IPython after %matplotlib inline magic has been used. If inline figures are not set they work as expected.

UnpickleableError: Cannot pickle <type 'Image'> objects

Using matplotlib.tests.test_pickle.recursive_pickle fails reporting the following (similar to #1719):

Failed to pickle attribute "gridline" in (list/tuple item #0 in (attribute "majorTicks" in (attribute "xaxis" in (list/tuple item #1 in (list/tuple item #1 in (list/tuple item #0 in (attribute "_elements" in (attribute "_axstack" in (top level object))))))))).  Type: <class 'matplotlib.lines.Line2D'>

However, using matplotlib.tests.test_pickle.depth_getter its possible to identify the object that is the cause of the initial error. It's at:

140628613187224 (8, <Image object at 0x7fe6a688c698>, u'attribute "_imcache" in (list/tuple item #0 in (attribute "images" in (list/tuple item #1 in (list/tuple item #1 in (list/tuple item #0 in (attribute "_elements" in (attribute "_axstack" in (top level object))))))))')

It looks as though this is a cache of the rendered image. Can these be ignored when pickling?

@tacaswell tacaswell added this to the v1.5.x milestone Oct 3, 2014
@tacaswell
Copy link
Member

I think partial duplicate of #3392

@pelson pelson closed this as completed in ba6e42a Oct 10, 2014
@QuLogic QuLogic modified the milestones: v1.4.1, 2.1 (next point release) Oct 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants