Description
When I use WebAgg in Python3.3 / latest mpl from git I get the error
In [6]: pyplot.show()
TypeError Traceback (most recent call last)
in ()
----> 1 pyplot.show()
/usr/lib64/python3.3/site-packages/matplotlib/pyplot.py in show(_args, *_kw)
147 """
148 global _show
--> 149 return _show(_args, *_kw)
150
151
/usr/lib64/python3.3/site-packages/matplotlib/backends/backend_webagg.py in show()
106 for manager in pylab_helpers.Gcf().get_all_fig_managers():
107 result.append(ipython_inline_display(manager.canvas.figure))
--> 108 return display_html('\n'.join(result), raw=True)
109
110
which is because
In [7]: %debug
/usr/lib64/python3.3/site-packages/matplotlib/backends/backend_webagg.py(108)show()
107 result.append(ipython_inline_display(manager.canvas.figure))
--> 108 return display_html('\n'.join(result), raw=True)
109
ipdb> result
[b'<!-- Within the kernel, we don't know the address of the matplotlib\n websocket server, so we have to get in client-side ...
This can be fixed replacing (line 108 in matplotlib/backends/backend_webagg.py)
return display_html('\n'.join(result), raw=True)
by
return display_html('\n'.join([r.decode('us-ascii', 'ignore') for r in result]), raw=True)
-Alexander