question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WebDriverException when using export_png

See original GitHub issue

Bokeh v0.12.10

When I try to use export_png in my application, I receive (pretty-printed):

{
  "errorMessage": "'undefined' is not an object (evaluating 'window.Bokeh.documents')",
  "request": {
    "headers": {
      "Accept": "application\/json",
      "Accept-Encoding": "identity",
      "Connection": "close",
      "Content-Length": "349",
      "Content-Type": "application\/json;charset=UTF-8",
      "Host": "127.0.0.1:32956",
      "User-Agent": "Python-urllib\/3.5"
    },
    "httpVersion": "1.1",
    "method": "POST",
    "post": "{\"sessionId\": \"ae4dd6f0-c218-11e7-8813-fba0ae2a2a1f\", \"script\": \"\\n\/\/ add private window prop to check that render is complete\\nwindow._bokeh_render_complete = false;\\nfunction done() {\\n  window._bokeh_render_complete = true;\\n}\\n\\nvar doc = window.Bokeh.documents[0];\\n\\nif (doc.is_idle)\\n  done();\\nelse\\n  doc.idle.connect(done);\\n\", \"args\": []}",
    "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\/ae4dd6f0-c218-11e7-8813-fba0ae2a2a1f\/execute"
  }
}

Apparently, Bokeh.documents can still be uninitialized when the page is loaded by Selenium. Maybe wait_until_render_complete should use WebDriverWait to also check that Bokeh.documets exists?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
p-himikcommented, Mar 13, 2018

@AzraelDD I’ve created #7621 since it has a completely different root cause.

0reactions
jnettelscommented, Mar 9, 2018

I implemented the merged PR in my local files, but the example I refered to before still does not work as expected: https://gist.github.com/AzraelDD/c4573f531fbc52cf5d0811d81d30a3fa After the layout has been added to the root, exporting the png of a fig is not possible anymore.

Should that become a separate issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error using export_png - Community Support - Bokeh Discourse
I have a figure() object that I wish to save as a png. However, I get this error. raise exception_class(message, screen, stacktrace)
Read more >
Message: connection refused while launching Firefox browser ...
Selenium Python selenium.common.exceptions.WebDriverException: Message: connection refused using geckodriver and firefox.
Read more >
OpenQA.Selenium.WebDriverException : No response from ...
When using ChromeDriver via ChromeDriverService and RemoteDriver and run multiple tests. They _sometimes_ fail with the exception above.
Read more >
Use org.openqa.selenium.WebDriverException in JUnit With ...
Learn how to use WebDriverException class in org.openqa.selenium package for your next JUnit project with LambdaTest Automation Testing Advisor.
Read more >
Safari Driver throws org.openqa.selenium.WebDriverException
I switched to iframe using switchto frame (based on frame name). Below is the element xpath inside iframe (from safari browser): <html> <head>...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found