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

Notebook backend broken on Master #5944

Closed
jenshnielsen opened this issue Jan 29, 2016 · 3 comments
Closed

Notebook backend broken on Master #5944

jenshnielsen opened this issue Jan 29, 2016 · 3 comments
Assignees
Milestone

Comments

@jenshnielsen
Copy link
Member

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

@jenshnielsen jenshnielsen added this to the 2.1 (next point release) milestone Jan 29, 2016
@mdboom mdboom self-assigned this Jan 29, 2016
@mdboom mdboom modified the milestones: 1.5.2 (Critical bug fix release), 2.1 (next point release) Jan 29, 2016
@mdboom
Copy link
Member

mdboom commented Jan 29, 2016

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

@mdboom mdboom modified the milestones: 2.0 (style change major release), 1.5.2 (Critical bug fix release), 2.1 (next point release) Jan 29, 2016
@jenshnielsen
Copy link
Member Author

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

@mdboom
Copy link
Member

mdboom commented Jan 29, 2016

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.

jenshnielsen added a commit that referenced this issue Jan 30, 2016
Fix #5944: Fix PNG writing from notebook backend
dashed pushed a commit to dashed/matplotlib that referenced this issue Feb 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants