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.

"bokeh serve" on official example shows a blank webpage

See original GitHub issue

Environment:

OS: macOS 10.12.5 Python: 3.6.0 (x86-64) browser: Chrome 58.0.3029.110 (64-bit), Safari Bokeh: 0.12.5 anaconda: custom-py36_0 conda: 4.3.21-py36_0

Description of expected behavior and the observed behavior

Expected: browser shows the chart Observed: blank webpage

Complete, minimal, self-contained example code that reproduces the issue

fourier_animated.py from official examples/plotting/server folder: fourier_animated.py.zip Use command bokeh serve fourier_animated.py --show

Stack traceback and/or browser JavaScript console output

2017-06-11 15:42:50,357 Starting Bokeh server version 0.12.5 2017-06-11 15:42:50,361 Starting Bokeh server on port 5006 with applications at paths [‘/fourier_animated’] 2017-06-11 15:42:50,361 Starting Bokeh server with process id: 12616 0:54: execution error: ““http://localhost:5006/fourier_animated””不理解“open location”信息。 (-1708) 2017-06-11 15:43:11,117 Failed to connect to server: HTTP 599: Timeout during request 2017-06-11 15:43:11,119 Error running application handler <bokeh.application.handlers.script.ScriptHandler object at 0x1103a8748>: Cannot push session document because we failed to connect to the server (to start the server, try the ‘bokeh serve’ command) File “session.py”, line 298, in push: raise IOError(“Cannot push session document because we failed to connect to the server (to start the server, try the ‘bokeh serve’ command)”) Traceback (most recent call last): File “/Users/yo/anaconda/lib/python3.6/site-packages/bokeh/application/handlers/code_runner.py”, line 81, in run exec(self._code, module.dict) File “/Users/yo/Development/python/bokeh/examples/plotting/server/fourier_animated.py”, line 175, in <module> session = push_session(curdoc()) File “/Users/yo/anaconda/lib/python3.6/site-packages/bokeh/client/session.py”, line 86, in push_session session.push(document) File “/Users/yo/anaconda/lib/python3.6/site-packages/bokeh/client/session.py”, line 298, in push raise IOError(“Cannot push session document because we failed to connect to the server (to start the server, try the ‘bokeh serve’ command)”) OSError: Cannot push session document because we failed to connect to the server (to start the server, try the ‘bokeh serve’ command)

2017-06-11 15:43:11,128 200 GET /fourier_animated (::1) 20358.16ms 2017-06-11 15:43:11,129 404 GET /ws?bokeh-protocol-version=1.0&bokeh-session-id=rTFzXtpvEXeDpZFrps4UDMe81PeukDWSEM9EpihCmlVy (::1) 0.42ms 2017-06-11 15:43:11,430 WebSocket connection opened 2017-06-11 15:43:11,430 ServerConnection created

Source code of the blank webpage

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Bokeh Application</title>
        
<link rel="stylesheet" href="static/css/bokeh.min.css?v=1bb409ee97bc7539326089bbfc2aad84" type="text/css" />
<link rel="stylesheet" href="static/css/bokeh-widgets.min.css?v=de1aa4588db0ebb1076588c26ac1e07c" type="text/css" />
        
<script type="text/javascript" src="static/js/bokeh.min.js?v=d5277ec06271e90def555abd13cd3b2f"></script>
<script type="text/javascript" src="static/js/bokeh-widgets.min.js?v=ff67b7fa94bb9ebef0e0e2c97f8c95f0"></script>
<script type="text/javascript" src="static/js/bokeh-gl.min.js?v=dac0ba7cb19b33bf935e67b96a95b546"></script>
<script type="text/javascript">
    Bokeh.set_log_level("info");
</script>
        <style>
          html {
            width: 100%;
            height: 100%;
          }
          body {
            width: 90%;
            height: 100%;
            margin: auto;
          }
        </style>
    </head>
    <body>
        
        <div class="bk-root">
            <div class="bk-plotdiv" id="982535fd-0189-4d6d-a7cf-bfa8ebfb7ce9"></div>
        </div>
        
        <script type="text/javascript">
            (function() {
          var fn = function() {
            Bokeh.safely(function() {
              var docs_json = {};
              var render_items = [{"elementid":"982535fd-0189-4d6d-a7cf-bfa8ebfb7ce9","sessionid":"aFOeoEtS9qJKYD3nm4JepfNudksEYlscUHLIHDJlt7aP","use_for_title":true}];
              
              Bokeh.embed.embed_items(docs_json, render_items);
            });
          };
          if (document.readyState != "loading") fn();
          else document.addEventListener("DOMContentLoaded", fn);
        })();
        
        </script>
    </body>
</html>

Screenshots or screencasts of the bug in action

image

image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jbednarcommented, Feb 5, 2018

Just to clarify, I don’t want to claim that pyviz.org is the most up to date; it’s probably the opposite. pyviz.org is where we show how all the various projects fit together to solve problems, and as such the most bleeding-edge features are likely to be better documented in each individual project, whereas how to use them together is documented at pyviz.org. We’ll be updating all of the websites over the next few months, but yes, it’s a continual struggle to keep up with the rate at which each of these projects are progressing!

1reaction
jbednarcommented, Feb 2, 2018

We’ve recently set up http://pyviz.org to help demonstrate how all these projects fit together. I’d recommend going through the tutorial at that site, which sets up an environment including all of those packages along with examples of how to use each of the projects separately and together. Stay tuned to that site; we’ll be trying to put a lot more useful stuff there over the next few months!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bokeh Server posts a blank page - Community Support
My Bokeh application shows a blank page but there is no error message. Currently using Bokeh 2.0.1 and Tornado 6.0.4 (Python 3.8.2)
Read more >
python 3.x - Bokeh serve returns white page - Stack Overflow
I try to serve a bokeh app via bokeh serve myapp.py and the app is running at: http://localhost:5006/myapp. However, the browser shows a...
Read more >
Data Visualization with Bokeh in Python, Part III: Making a ...
In this post, we will see how to set up a full Bokeh application and run a local Bokeh server accessible in your...
Read more >
Panel 0.10.3 and bokeh 2.2.3 server_document shows blank ...
I have been running panel/bokeh server and having flask display the panel apps on the same machine (vm) for a while.
Read more >
Sample Binder Repositories — Binder 0.1b documentation
This example shows how you can install a Julia and Python environment ... This repository demonstrates how to run a Bokeh server from...
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