X Tutup
Skip to content

Can't pickle <type 'instancemethod'> #7105

@moi90

Description

@moi90

Sometimes I can't pickle figures.

Works:

  • fig = plt.gcf(), pickle.dump(fig, file, pickle.HIGHEST_PROTOCOL)

Does not work:

  • fig = plt.figure(), pickle.dump(fig, file, pickle.HIGHEST_PROTOCOL)
  • fig, ax = plt.subplots(), pickle.dump(fig, file, pickle.HIGHEST_PROTOCOL)

I also loaded a pickled figure and changed some things and it wouldn't pickle either.

Matplotlib 1.5.1 via pip
Python 2.7.6 in virtualenv
Linux

Metadata

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

      X Tutup