I am trying to use the export_svg function and I have run through the instructions a couple of time on seperate anaconda envs but i always end up with the following error:
WebDriverException: Message: {"errorMessage":"'undefined' is not an object (evaluating 'window.Bokeh.documents')","request":{"headers":{"Accept":"application/json","Accept-Encoding":"identity","Connection":"close","Content-Length":"393","Content-Type":"application/json;charset=UTF-8","Host":"127.0.0.1:44396","User-Agent":"Python-urllib/3.5"},"httpVersion":"1.1","method":"POST","post":"{\"args\": [], \"script\": \"\\n // add private window prop to check that render is complete\\n window._bokeh_render_complete = false;\\n function done() {\\n window._bokeh_render_complete = true;\\n }\\n\\n var doc = window.Bokeh.documents[0];\\n\\n if (doc.is_idle)\\n done();\\n else\\n doc.idle.connect(done);\\n \", \"sessionId\": \"94648620-9195-11e7-a5e8-1db0d19292db\"}","url":"/execute","urlParsed":{"anchor":"","query":"","file":"execute","directory":"/","path":"/execute","relative":"/execute","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/execute","queryKey":{},"chunks":["execute"]},"urlOriginal":"/session/94648620-9195-11e7-a5e8-1db0d19292db/execute"}}
Screenshot: available via screen
The code that i try to execture is the following:
from bokeh.io import export_svgs
import bokeh.plotting as bp
import bokeh.models as bm
fig = bp.figure(output_backend='svg')
cross = fig.diamond(x=1,y=1,color='red')
square = fig.square(x=2,y=1)
legends = [['circle',[cross]],['square',[square]]]
legend = bm.Legend(items=legends)
fig.add_layout(legend,'left')
export_svgs(fig, filename="plot.svg")
Bokeh 0.12.7
phantomjs 1.9.7
selenium 2.53.6
Is this a bug?

