Export SVG Error

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?

I believe you will need phantomjs >= 2.0 unfortunately for optional non-python dependencies there isn't really any mechanism for us to specify them more specifically.

Thanks,

Bryan

···

On Sep 4, 2017, at 12:28, Mathew <[email protected]> wrote:

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?

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/2aaffd8d-999f-4707-ac8b-085e911bd61c%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Perfect, that seems to have done the trick.
Thanks!

···

On Monday, 4 September 2017 18:51:43 UTC+1, Bryan Van de ven wrote:

I believe you will need phantomjs >= 2.0 unfortunately for optional non-python dependencies there isn’t really any mechanism for us to specify them more specifically.

Thanks,

Bryan

On Sep 4, 2017, at 12:28, Mathew [email protected] wrote:

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?


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/2aaffd8d-999f-4707-ac8b-085e911bd61c%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.