Compatibility for png export in bokeh 0.12.7
@@ -82,6 +82,9 @@ class BokehRenderer(Renderer):
if bokeh_version < '0.12.6':
raise RuntimeError('Bokeh png export only supported by versions >=0.12.6.')
from bokeh.io import _get_screenshot_as_png
+ if bokeh_version > '0.12.6':
+ img = _get_screenshot_as_png(plot.state, None)
+ else:
img = _get_screenshot_as_png(plot.state)
imgByteArr = BytesIO()
img.save(imgByteArr, format='PNG')
