Skip to content

Notebook backend broken on Master #5944

Closed

Description

@jenshnielsen

Just trying to do something simple like:

%matplotlib notebook
import matplotlib.pyplot as plt
plt.plot(range(10))
plt.tight_layout()

results in

Traceback (most recent call last):
  File "/Users/jhn/Envs/matplotlibbisect/lib/python3.5/site-packages/ipykernel/comm/manager.py", line 137, in comm_msg
    comm.handle_msg(msg)
  File "/Users/jhn/Envs/matplotlibbisect/lib/python3.5/site-packages/ipykernel/comm/comm.py", line 164, in handle_msg
    self._msg_callback(msg)
  File "/Users/jhn/Envs/matplotlibbisect/lib/python3.5/site-packages/matplotlib/backends/backend_nbagg.py", line 304, in on_message
    self.manager.handle_json(message)
  File "/Users/jhn/Envs/matplotlibbisect/lib/python3.5/site-packages/matplotlib/backends/backend_webagg_core.py", line 485, in handle_json
    self.canvas.handle_event(content)
  File "/Users/jhn/Envs/matplotlibbisect/lib/python3.5/site-packages/matplotlib/backends/backend_webagg_core.py", line 272, in handle_event
    return handler(event)
  File "/Users/jhn/Envs/matplotlibbisect/lib/python3.5/site-packages/matplotlib/backends/backend_webagg_core.py", line 288, in handle_draw
    self.draw()
  File "/Users/jhn/Envs/matplotlibbisect/lib/python3.5/site-packages/matplotlib/backends/backend_webagg_core.py", line 181, in draw
    self.manager.refresh_all()
  File "/Users/jhn/Envs/matplotlibbisect/lib/python3.5/site-packages/matplotlib/backends/backend_webagg_core.py", line 489, in refresh_all
    diff = self.canvas.get_diff_image()
  File "/Users/jhn/Envs/matplotlibbisect/lib/python3.5/site-packages/matplotlib/backends/backend_webagg_core.py", line 232, in get_diff_image
    None, compression=6, filter=_png.PNG_FILTER_NONE)
TypeError: Object does not appear to be a 8-bit string path or a Python file-like object

git bisect tells me that it was broken by 9758da5

Activity

  1. added this to the milestone on Jan 29, 2016
  2. self-assigned this
    on Jan 29, 2016
  3. modified the milestones: , on Jan 29, 2016
  4. mdboom commented on Jan 29, 2016

    @mdboom
    Member

    Remilestoned to 1.5.2, since #5910 was backported to there and now has this bug as well.

  5. modified the milestones: , , on Jan 29, 2016
  6. jenshnielsen commented on Jan 29, 2016

    @jenshnielsen
    MemberAuthor

    I can't reproduce it on 1.5.x I guess the backport does stuff slightly different?

  7. mdboom commented on Jan 29, 2016

    @mdboom
    Member

    Yes -- you were right, actually. Only master has the "pass None to _png.write_png to write to a string buffer" optimization that's affected by this.

  8. added a commit that references this issue on Jan 29, 2016
    ef1b1a4
  9. added a commit that references this issue on Jan 30, 2016
    1943acc
  10. added a commit that references this issue on Feb 1, 2016
    f78f725
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions