{"action":"created","issue":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/7105","repository_url":"https://api.github.com/repos/matplotlib/matplotlib","labels_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/7105/labels{/name}","comments_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/7105/comments","events_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/7105/events","html_url":"https://github.com/matplotlib/matplotlib/issues/7105","id":176746496,"number":7105,"title":"Can't pickle <type 'instancemethod'>","user":{"login":"moi90","id":332746,"avatar_url":"https://avatars.githubusercontent.com/u/332746?v=3","gravatar_id":"","url":"https://api.github.com/users/moi90","html_url":"https://github.com/moi90","followers_url":"https://api.github.com/users/moi90/followers","following_url":"https://api.github.com/users/moi90/following{/other_user}","gists_url":"https://api.github.com/users/moi90/gists{/gist_id}","starred_url":"https://api.github.com/users/moi90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moi90/subscriptions","organizations_url":"https://api.github.com/users/moi90/orgs","repos_url":"https://api.github.com/users/moi90/repos","events_url":"https://api.github.com/users/moi90/events{/privacy}","received_events_url":"https://api.github.com/users/moi90/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-13T20:52:58Z","updated_at":"2016-09-13T20:55:06Z","closed_at":null,"body":"Sometimes I can't pickle figures.\r\n\r\nWorks:\r\n- fig = plt.gcf(), pickle.dump(fig, file, pickle.HIGHEST_PROTOCOL)\r\n\r\nDoes not work:\r\n- fig = plt.figure(), pickle.dump(fig, file, pickle.HIGHEST_PROTOCOL)\r\n- fig, ax = plt.subplots(), pickle.dump(fig, file, pickle.HIGHEST_PROTOCOL)\r\n\r\nI also loaded a pickled figure and changed some things and it wouldn't pickle either.\r\n\r\nMatplotlib 1.5.1 via pip\r\nPython 2.7.6 in virtualenv\r\nLinux"},"comment":{"url":"https://api.github.com/repos/matplotlib/matplotlib/issues/comments/246820958","html_url":"https://github.com/matplotlib/matplotlib/issues/7105#issuecomment-246820958","issue_url":"https://api.github.com/repos/matplotlib/matplotlib/issues/7105","id":246820958,"user":{"login":"moi90","id":332746,"avatar_url":"https://avatars.githubusercontent.com/u/332746?v=3","gravatar_id":"","url":"https://api.github.com/users/moi90","html_url":"https://github.com/moi90","followers_url":"https://api.github.com/users/moi90/followers","following_url":"https://api.github.com/users/moi90/following{/other_user}","gists_url":"https://api.github.com/users/moi90/gists{/gist_id}","starred_url":"https://api.github.com/users/moi90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moi90/subscriptions","organizations_url":"https://api.github.com/users/moi90/orgs","repos_url":"https://api.github.com/users/moi90/repos","events_url":"https://api.github.com/users/moi90/events{/privacy}","received_events_url":"https://api.github.com/users/moi90/received_events","type":"User","site_admin":false},"created_at":"2016-09-13T20:55:06Z","updated_at":"2016-09-13T20:55:06Z","body":"```\r\nTraceback (most recent call last):\r\n  File \"<input>\", line 2, in <module>\r\n  File \"/usr/lib/python2.7/pickle.py\", line 1370, in dump\r\n    Pickler(file, protocol).dump(obj)\r\n  File \"/usr/lib/python2.7/pickle.py\", line 224, in dump\r\n    self.save(obj)\r\n  File \"/usr/lib/python2.7/pickle.py\", line 331, in save\r\n    self.save_reduce(obj=obj, *rv)\r\n  File \"/usr/lib/python2.7/pickle.py\", line 419, in save_reduce\r\n    save(state)\r\n  File \"/usr/lib/python2.7/pickle.py\", line 286, in save\r\n    f(self, obj) # Call unbound method with explicit self\r\n  File \"/usr/lib/python2.7/pickle.py\", line 649, in save_dict\r\n    self._batch_setitems(obj.iteritems())\r\n  File \"/usr/lib/python2.7/pickle.py\", line 681, in _batch_setitems\r\n    save(v)\r\n  File \"/usr/lib/python2.7/pickle.py\", line 331, in save\r\n    self.save_reduce(obj=obj, *rv)\r\n  File \"/usr/lib/python2.7/pickle.py\", line 419, in save_reduce\r\n    save(state)\r\n  File \"/usr/lib/python2.7/pickle.py\", line 286, in save\r\n    f(self, obj) # Call unbound method with explicit self\r\n  File \"/usr/lib/python2.7/pickle.py\", line 649, in save_dict\r\n    self._batch_setitems(obj.iteritems())\r\n  File \"/usr/lib/python2.7/pickle.py\", line 681, in _batch_setitems\r\n    save(v)\r\n  File \"/usr/lib/python2.7/pickle.py\", line 286, in save\r\n    f(self, obj) # Call unbound method with explicit self\r\n  File \"/usr/lib/python2.7/pickle.py\", line 600, in save_list\r\n    self._batch_appends(iter(obj))\r\n  File \"/usr/lib/python2.7/pickle.py\", line 636, in _batch_appends\r\n    save(tmp[0])\r\n  File \"/usr/lib/python2.7/pickle.py\", line 286, in save\r\n    f(self, obj) # Call unbound method with explicit self\r\n  File \"/usr/lib/python2.7/pickle.py\", line 548, in save_tuple\r\n    save(element)\r\n  File \"/usr/lib/python2.7/pickle.py\", line 286, in save\r\n    f(self, obj) # Call unbound method with explicit self\r\n  File \"/usr/lib/python2.7/pickle.py\", line 548, in save_tuple\r\n    save(element)\r\n  File \"/usr/lib/python2.7/pickle.py\", line 331, in save\r\n    self.save_reduce(obj=obj, *rv)\r\n  File \"/usr/lib/python2.7/pickle.py\", line 419, in save_reduce\r\n    save(state)\r\n  File \"/usr/lib/python2.7/pickle.py\", line 286, in save\r\n    f(self, obj) # Call unbound method with explicit self\r\n  File \"/usr/lib/python2.7/pickle.py\", line 649, in save_dict\r\n    self._batch_setitems(obj.iteritems())\r\n  File \"/usr/lib/python2.7/pickle.py\", line 681, in _batch_setitems\r\n    save(v)\r\n  File \"/usr/lib/python2.7/pickle.py\", line 331, in save\r\n    self.save_reduce(obj=obj, *rv)\r\n  File \"/usr/lib/python2.7/pickle.py\", line 419, in save_reduce\r\n    save(state)\r\n  File \"/usr/lib/python2.7/pickle.py\", line 286, in save\r\n    f(self, obj) # Call unbound method with explicit self\r\n  File \"/usr/lib/python2.7/pickle.py\", line 649, in save_dict\r\n    self._batch_setitems(obj.iteritems())\r\n  File \"/usr/lib/python2.7/pickle.py\", line 681, in _batch_setitems\r\n    save(v)\r\n  File \"/usr/lib/python2.7/pickle.py\", line 331, in save\r\n    self.save_reduce(obj=obj, *rv)\r\n  File \"/usr/lib/python2.7/pickle.py\", line 396, in save_reduce\r\n    save(cls)\r\n  File \"/usr/lib/python2.7/pickle.py\", line 286, in save\r\n    f(self, obj) # Call unbound method with explicit self\r\n  File \"/usr/lib/python2.7/pickle.py\", line 748, in save_global\r\n    (obj, module, name))\r\nPicklingError: Can't pickle <type 'instancemethod'>: it's not found as __builtin__.instancemethod\r\n```"}}
{"actor":{"display_login":"moi90"}}