Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/300.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 向Heroku部署嵌入Flask中的Bokeh服务器图_Python_Heroku_Flask_Bokeh - Fatal编程技术网

Python 向Heroku部署嵌入Flask中的Bokeh服务器图

Python 向Heroku部署嵌入Flask中的Bokeh服务器图,python,heroku,flask,bokeh,Python,Heroku,Flask,Bokeh,我能够在Flask中嵌入一个bokeh服务器图。这是本地主机上的输出: 问题是我无法在Heroku上完成这项工作。我看到的只是“这是你的好网站”的文字 因此,该应用程序由三个文件组成 下面是包含图形的脚本: #bokeh_plot.py import pandas as pd from bokeh.layouts import row, widgetbox from bokeh.models import Select from bokeh.palettes import Spectral5

我能够在Flask中嵌入一个bokeh服务器图。这是本地主机上的输出:

问题是我无法在Heroku上完成这项工作。我看到的只是“这是你的好网站”的文字

因此,该应用程序由三个文件组成

下面是包含图形的脚本:

#bokeh_plot.py
import pandas as pd

from bokeh.layouts import row, widgetbox
from bokeh.models import Select
from bokeh.palettes import Spectral5
from bokeh.plotting import curdoc, figure
from bokeh.sampledata.autompg import autompg

df = autompg.copy()

SIZES = list(range(6, 22, 3))
COLORS = Spectral5
ORIGINS = ['North America', 'Europe', 'Asia']

# data cleanup
df.cyl = [str(x) for x in df.cyl]
df.origin = [ORIGINS[x-1] for x in df.origin]

df['year'] = [str(x) for x in df.yr]
del df['yr']

df['mfr'] = [x.split()[0] for x in df.name]
df.loc[df.mfr=='chevy', 'mfr'] = 'chevrolet'
df.loc[df.mfr=='chevroelt', 'mfr'] = 'chevrolet'
df.loc[df.mfr=='maxda', 'mfr'] = 'mazda'
df.loc[df.mfr=='mercedes-benz', 'mfr'] = 'mercedes'
df.loc[df.mfr=='toyouta', 'mfr'] = 'toyota'
df.loc[df.mfr=='vokswagen', 'mfr'] = 'volkswagen'
df.loc[df.mfr=='vw', 'mfr'] = 'volkswagen'
del df['name']

columns = sorted(df.columns)
discrete = [x for x in columns if df[x].dtype == object]
continuous = [x for x in columns if x not in discrete]
quantileable = [x for x in continuous if len(df[x].unique()) > 20]


def create_figure():
    xs = df[x.value].values
    ys = df[y.value].values
    x_title = x.value.title()
    y_title = y.value.title()

    kw = dict()
    if x.value in discrete:
        kw['x_range'] = sorted(set(xs))
    if y.value in discrete:
        kw['y_range'] = sorted(set(ys))
    kw['title'] = "%s vs %s" % (x_title, y_title)

    p = figure(plot_height=600, plot_width=800, tools='pan,box_zoom,reset', **kw)
    p.xaxis.axis_label = x_title
    p.yaxis.axis_label = y_title

    if x.value in discrete:
        p.xaxis.major_label_orientation = pd.np.pi / 4

    sz = 9
    if size.value != 'None':
        groups = pd.qcut(df[size.value].values, len(SIZES))
        sz = [SIZES[xx] for xx in groups.codes]

    c = "#31AADE"
    if color.value != 'None':
        groups = pd.qcut(df[color.value].values, len(COLORS))
        c = [COLORS[xx] for xx in groups.codes]
    p.circle(x=xs, y=ys, color=c, size=sz, line_color="white", alpha=0.6, hover_color='white', hover_alpha=0.5)

    return p


def update(attr, old, new):
    layout.children[1] = create_figure()


x = Select(title='X-Axis', value='mpg', options=columns)
x.on_change('value', update)

y = Select(title='Y-Axis', value='hp', options=columns)
y.on_change('value', update)

size = Select(title='Size', value='None', options=['None'] + quantileable)
size.on_change('value', update)

color = Select(title='Color', value='None', options=['None'] + quantileable)
color.on_change('value', update)

controls = widgetbox([x, y, color, size], width=200)
layout = row(controls, create_figure())

curdoc().add_root(layout)
curdoc().title = "Crossfilter"
烧瓶脚本:

#app.py
import subprocess
import atexit
from flask import render_template, render_template_string, Flask
from bokeh.embed import autoload_server
from bokeh.client import pull_session

app = Flask(__name__)

bokeh_process = subprocess.Popen(
    ['bokeh', 'serve','--allow-websocket-origin=localhost:5000','bokeh_plot.py'], stdout=subprocess.PIPE)

@atexit.register
def kill_server():
    bokeh_process.kill()

@app.route("/")
def index():
    session=pull_session(app_path="/bokeh_plot")
    bokeh_script=autoload_server(None,app_path="/bokeh_plot",session_id=session.id)
    return render_template("index.html", bokeh_script=bokeh_script)

if __name__ == "__main__":
    print("STARTED")
    app.run(debug=True)
以及index.html模板:

<!DOCTYPE html>
<html lang="en">
    <head>
        <style>
            @import url(https://fonts.googleapis.com/css?family=Noto+Sans);
            body {
              font-family: 'Noto Sans', sans-serif;
              -webkit-font-smoothing: antialiased;
              text-rendering: optimizeLegibility;
              color: #fff;
              background: #2F2F2F;
             }
        </style>
        <meta charset="utf-8">
        <title>Bokeh Crossfilter Example</title>
    </head>
    <body>
      <p> This is your great site<p>
      <div class="bk-root">
        {{ bokeh_script|safe }}
      </div>
    </body>
</html>
我在网上拼命地寻找答案,但还没有找到任何关于如何部署包含bokeh服务器应用程序的flask应用程序的信息。因此,如果有人能够提供答案,这篇文章可能是一个很好的资源

我相信关键在app.py文件中调用bokeh服务器的子流程行中,但我对web服务的了解有限,因此,我不知道如何使其工作。有什么想法吗

编辑1:bigreddot建议将--allow websocket origin的值更改为应用程序的url。所以,我把localhost:5000改成了bokehapp.herokuapp.com。这似乎修复了IOR错误:无法放置会话文档。然而,图表仍然没有显示。以下是我从Heroku那里得到的新日志:

heroku[slug-compiler]: Slug compilation finished
heroku[slug-compiler]: Slug compilation started
heroku[web.1]: State changed from down to starting
heroku[web.1]: Starting process with command `gunicorn app:app`
app[web.1]: [2016-07-25 15:02:50 +0000] [3] [INFO] Using worker: sync
app[web.1]: [2016-07-25 15:02:50 +0000] [7] [INFO] Booting worker with pid: 7
app[web.1]: [2016-07-25 15:02:50 +0000] [3] [INFO] Starting gunicorn 19.6.0
app[web.1]: [2016-07-25 15:02:50 +0000] [3] [INFO] Listening at: http://0.0.0.0:23620 (3)
app[web.1]: [2016-07-25 15:02:50 +0000] [8] [INFO] Booting worker with pid: 8
heroku[api]: Release v7 created by adiadi@gmail.com
heroku[api]: Deploy be12fcc by adiadi@gmail.com
heroku[web.1]: State changed from starting to up
"app[web.1]: 2016-07-25 15:02:55,278 Starting Bokeh server with process id: 25"
"app[web.1]: 2016-07-25 15:02:55,261 Starting Bokeh server version 0.12.0"
"app[web.1]: 2016-07-25 15:02:55,276 Starting Bokeh server version 0.12.0"
"app[web.1]: 2016-07-25 15:02:55,284 Cannot start Bokeh server, port 5006 is already in use"
"app[web.1]: 2016-07-25 15:02:55,278 Starting Bokeh server on port 5006 with applications at paths ['/bokeh_plot']"
"app[web.1]: 2016-07-25 15:03:14,375 WebSocket connection opened"
"app[web.1]: 2016-07-25 15:03:15,029 ServerConnection created"
"heroku[router]: at=info method=GET path=""/"" host=bokehapp.herokuapp.com request_id=5e7a06ad-4526-4304-b00e-0c37979ab751 fwd=""109.236.33.234"" dyno=web.1 connect=1ms service=3778ms status=200 bytes=1066"
"app[web.1]: 2016-07-25 15:03:59,253 ServerConnection created"
"app[web.1]: 2016-07-25 15:03:59,133 WebSocket connection opened"
编辑2:将--log level=debug传递到子流程后,会有更多日志:

heroku[slug-compiler]: Slug compilation started
heroku[slug-compiler]: Slug compilation finished
heroku[api]: Deploy 9c2fefa by adiadi@gmail.com
heroku[api]: Release v12 created by adiadi@gmail.com
heroku[web.1]: Restarting
heroku[web.1]: State changed from up to starting
heroku[web.1]: Stopping all processes with SIGTERM
app[web.1]: [2016-07-25 21:53:37 +0000] [3] [INFO] Handling signal: term
app[web.1]: [2016-07-25 21:53:37 +0000] [7] [INFO] Worker exiting (pid: 7)
app[web.1]: [2016-07-25 21:53:38 +0000] [3] [INFO] Shutting down: Master
app[web.1]: [2016-07-25 21:53:37 +0000] [8] [INFO] Worker exiting (pid: 8)
heroku[web.1]: Process exited with status 0
heroku[web.1]: Starting process with command `gunicorn app:app`
app[web.1]: [2016-07-25 21:53:53 +0000] [3] [INFO] Starting gunicorn 19.6.0
app[web.1]: [2016-07-25 21:53:53 +0000] [3] [INFO] Using worker: sync
app[web.1]: [2016-07-25 21:53:53 +0000] [8] [INFO] Booting worker with pid: 8
app[web.1]: [2016-07-25 21:53:53 +0000] [7] [INFO] Booting worker with pid: 7
app[web.1]: [2016-07-25 21:53:53 +0000] [3] [INFO] Listening at: http://0.0.0.0:41934 (3)
heroku[web.1]: State changed from starting to up
"app[web.1]: 2016-07-25 21:53:58,821 Allowed Host headers: ['localhost:5006']"
"app[web.1]: 2016-07-25 21:53:58,821 These host origins can connect to the websocket: ['bokehapp.herokuapp.com:80', 'localhost:5006']"
"app[web.1]: 2016-07-25 21:53:58,821 Patterns are:"
"app[web.1]: 2016-07-25 21:53:58,821 Starting Bokeh server version 0.12.0"
"app[web.1]: 2016-07-25 21:53:58,823     {'application_context': <bokeh.server.application_context.ApplicationContext object at 0x7f7bf7dd51d0>,"
"app[web.1]: 2016-07-25 21:53:58,832     <class 'bokeh.server.views.ws.WSHandler'>,"
"app[web.1]: 2016-07-25 21:53:58,832    ('/bokeh_plot/autoload.js',"
"app[web.1]: 2016-07-25 21:53:58,831    ('/bokeh_plot/ws',"
"app[web.1]: 2016-07-25 21:53:58,832     <class 'bokeh.server.views.autoload_js_handler.AutoloadJsHandler'>,"
"app[web.1]: 2016-07-25 21:53:58,832     {'application_context': <bokeh.server.application_context.ApplicationContext object at 0x7f7bf7dd51d0>,"
"app[web.1]: 2016-07-25 21:53:58,832      'bokeh_websocket_path': '/bokeh_plot/ws'}),"
"app[web.1]: 2016-07-25 21:53:58,833     {'applications': {'/bokeh_plot': <bokeh.server.application_context.ApplicationContext object at 0x7f7bf7dd51d0>},"
"app[web.1]: 2016-07-25 21:53:58,823   [('/bokeh_plot/?',"
"app[web.1]: 2016-07-25 21:53:58,823     <class 'bokeh.server.views.doc_handler.DocHandler'>,"
"app[web.1]: 2016-07-25 21:53:58,823      'bokeh_websocket_path': '/bokeh_plot/ws'}),"
"app[web.1]: 2016-07-25 21:53:58,832     {'application_context': <bokeh.server.application_context.ApplicationContext object at 0x7f7bf7dd51d0>,"
"app[web.1]: 2016-07-25 21:53:58,833      'prefix': '',"
"app[web.1]: 2016-07-25 21:53:58,833      'use_redirect': True}),"
"app[web.1]: 2016-07-25 21:53:58,833    ('/static/(.*)',"
"app[web.1]: 2016-07-25 21:53:58,833     <class 'bokeh.server.views.static_handler.StaticHandler'>)]"
"app[web.1]: 2016-07-25 21:53:58,832      'bokeh_websocket_path': '/bokeh_plot/ws'}),"
"app[web.1]: 2016-07-25 21:53:58,861 Starting Bokeh server on port 5006 with applications at paths ['/bokeh_plot']"
"app[web.1]: 2016-07-25 21:53:58,832    ('/?',"
"app[web.1]: 2016-07-25 21:53:58,833     <class 'bokeh.server.views.root_handler.RootHandler'>,"
"app[web.1]: 2016-07-25 21:53:58,896 These host origins can connect to the websocket: ['bokehapp.herokuapp.com:80', 'localhost:5006']"
"app[web.1]: 2016-07-25 21:53:58,898   [('/bokeh_plot/?',"
"app[web.1]: 2016-07-25 21:53:58,899     {'application_context': <bokeh.server.application_context.ApplicationContext object at 0x7f8a84cb4b70>,"
"app[web.1]: 2016-07-25 21:53:58,896 Starting Bokeh server version 0.12.0"
"app[web.1]: 2016-07-25 21:53:58,897 Patterns are:"
"app[web.1]: 2016-07-25 21:53:58,899     <class 'bokeh.server.views.doc_handler.DocHandler'>,"
"app[web.1]: 2016-07-25 21:53:58,896 Allowed Host headers: ['localhost:5006']"
"app[web.1]: 2016-07-25 21:53:58,900     <class 'bokeh.server.views.autoload_js_handler.AutoloadJsHandler'>,"
"app[web.1]: 2016-07-25 21:53:58,899    ('/bokeh_plot/ws',"
"app[web.1]: 2016-07-25 21:53:58,899     <class 'bokeh.server.views.ws.WSHandler'>,"
"app[web.1]: 2016-07-25 21:53:58,899      'bokeh_websocket_path': '/bokeh_plot/ws'}),"
"app[web.1]: 2016-07-25 21:53:58,899     {'application_context': <bokeh.server.application_context.ApplicationContext object at 0x7f8a84cb4b70>,"
"app[web.1]: 2016-07-25 21:53:58,900      'bokeh_websocket_path': '/bokeh_plot/ws'}),"
"app[web.1]: 2016-07-25 21:53:58,900    ('/bokeh_plot/autoload.js',"
"app[web.1]: 2016-07-25 21:53:58,861 Starting Bokeh server with process id: 25"
"app[web.1]: 2016-07-25 21:53:58,900     {'application_context': <bokeh.server.application_context.ApplicationContext object at 0x7f8a84cb4b70>,"
"app[web.1]: 2016-07-25 21:53:58,900      'bokeh_websocket_path': '/bokeh_plot/ws'}),"
"app[web.1]: 2016-07-25 21:53:58,901      'use_redirect': True}),"
"app[web.1]: 2016-07-25 21:53:58,900    ('/?',"
"app[web.1]: 2016-07-25 21:53:58,901    ('/static/(.*)',"
"app[web.1]: 2016-07-25 21:53:58,901     <class 'bokeh.server.views.static_handler.StaticHandler'>)]"
"app[web.1]: 2016-07-25 21:53:58,904 Cannot start Bokeh server, port 5006 is already in use"
"app[web.1]: 2016-07-25 21:53:58,900     <class 'bokeh.server.views.root_handler.RootHandler'>,"
"app[web.1]: 2016-07-25 21:53:58,901     {'applications': {'/bokeh_plot': <bokeh.server.application_context.ApplicationContext object at 0x7f8a84cb4b70>},"
"app[web.1]: 2016-07-25 21:53:58,901      'prefix': '',"
"app[web.1]: 2016-07-25 21:54:13,880 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:54:13,880 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:54:43,870 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:54:43,869 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:54:58,870 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:54:58,869 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:55:13,862 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:55:13,862 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:55:28,864 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:55:28,863 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:55:43,864 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:55:43,865 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:55:58,862 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:55:58,862 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:56:13,876 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:56:13,877 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:56:28,864 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:56:28,865 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:56:43,875 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:56:43,876 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:56:58,872 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:56:58,872 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:57:13,863 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:57:13,862 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:57:28,872 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:57:28,872 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:57:43,868 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:57:43,867 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:57:58,863 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:57:58,864 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:58:13,879 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:58:13,880 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:58:28,873 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:58:28,874 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:58:43,872 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:58:43,871 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:58:49,718 WebSocket connection opened"
"app[web.1]: 2016-07-25 21:58:50,223 Sending pull-doc-reply from session 'Q4LGpWidke5G85sboBiRPMazzPfwOwTDMirNrDsTY3OL'"
"app[web.1]: 2016-07-25 21:58:50,177 Receiver created for Protocol('1.0')"
"app[web.1]: 2016-07-25 21:58:50,178 ServerHandler created for Protocol('1.0')"
"app[web.1]: 2016-07-25 21:58:50,178 ServerConnection created"
"heroku[router]: at=info method=GET path=""/"" host=bokehapp.herokuapp.com request_id=15fc6908-1031-4d88-86cc-8048d6195a6f fwd=""109.236.47.207"" dyno=web.1 connect=1ms service=1341ms status=200 bytes=1066"
"app[web.1]: 2016-07-25 21:58:58,864 [pid 25]   /bokeh_plot has 1 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:58:58,863 [pid 25] 1 clients connected"
heroku[段塞编译器]:段塞编译已开始
heroku[段塞编译器]:段塞编译完成
heroku[api]:通过部署9c2fefaadiadi@gmail.com
heroku[api]:由创建的版本v12adiadi@gmail.com
heroku[web.1]:重新启动
heroku[web.1]:状态从开始更改为开始
heroku[web.1]:使用SIGTERM停止所有进程
app[web.1]:[2016-07-25 21:53:37+0000][3][INFO]处理信号:术语
app[web.1]:[2016-07-25 21:53:37+0000][7][INFO]工人退出(pid:7)
app[web.1]:[2016-07-25 21:53:38+0000][3][INFO]正在关闭:Master
app[web.1]:[2016-07-25 21:53:37+0000][8][INFO]工人退出(pid:8)
heroku[web.1]:进程已退出,状态为0
heroku[web.1]:使用命令'gunicorn app:app'启动进程`
app[web.1]:[2016-07-25 21:53:53+0000][3][INFO]启动gunicorn 19.6.0
app[web.1]:[2016-07-25 21:53:53+0000][3][INFO]正在使用worker:sync
app[web.1]:[2016-07-25 21:53:53+0000][8][INFO]带pid的引导工作程序:8
app[web.1]:[2016-07-25 21:53:53+0000][7][INFO]正在启动pid为的工作程序:7
app[web.1]:[2016-07-25 21:53:53+0000][3][INFO]收听地址:http://0.0.0.0:41934 (3)
heroku[web.1]:状态从启动更改为启动
“应用程序[web.1]:2016-07-25 21:53:58821允许的主机头:['localhost:5006']”
“应用程序[web.1]:2016-07-25 21:53:58821这些主机源可以连接到websocket:['bokehapp.herokuapp.com:80','localhost:5006']”
“应用[web.1]:2016-07-25 21:53:58821模式为:
“应用程序[web.1]:2016-07-25 21:53:58821正在启动Bokeh服务器版本0.12.0”
“应用程序[web.1]:2016-07-25 21:53:58823{‘应用程序上下文’:,”
“应用[网站1]:2016-07-25 21:53:58832,”
“app[web.1]:2016-07-25 21:53:58832('/bokeh_plot/autoload.js',”
“应用[web.1]:2016-07-25 21:53:58831(“/bokeh_plot/ws.””
“应用[网站1]:2016-07-25 21:53:58832,”
“应用程序[web.1]:2016-07-25 21:53:58832{'application_context':,”
“应用程序[web.1]:2016-07-25 21:53:58832‘博克·韦伯赛克路径’:‘/bokeh赛克图/ws’,”
“app[web.1]:2016-07-25 21:53:58833{'applications':{'bokeh_plot':},”
“应用程序[web.1]:2016-07-25 21:53:58823[(“/bokeh_plot/?”,”
“应用[网站1]:2016-07-25 21:53:58823,”
“应用程序[web.1]:2016-07-25 21:53:58823‘bokeh_websocket_path’:‘/bokeh_plot/ws’,”
“应用程序[web.1]:2016-07-25 21:53:58832{'application_context':,”
“应用[网站1]:2016-07-25 21:53:58833‘前缀’:”
“应用程序[web.1]:2016-07-25 21:53:58833‘使用重定向’:True}”
“app[web.1]:2016-07-25 21:53:58833('/static/(.*)”
“应用[网站1]:2016-07-25 21:53:58833)]”
“应用程序[web.1]:2016-07-25 21:53:58832‘博克·韦伯赛克路径’:‘/bokeh赛克图/ws’,”
“应用程序[web.1]:2016-07-25 21:53:58861在端口5006上启动Bokeh服务器,应用程序位于路径['/Bokeh_plot']””
“app[web.1]:2016-07-25 21:53:58832(“/?”
“应用[网站1]:2016-07-25 21:53:58833,”
“应用程序[web.1]:2016-07-25 21:53:58896这些主机源可以连接到websocket:['bokehapp.herokuapp.com:80','localhost:5006']”
“应用程序[web.1]:2016-07-25 21:53:58898[(“/bokeh_plot/?”,”
“应用程序[web.1]:2016-07-25 21:53:58899{‘应用程序上下文’:”
“应用程序[web.1]:2016-07-25 21:53:58896启动Bokeh服务器版本0.12.0”
“应用[web.1]:2016-07-25 21:53:58897模式包括:
“应用[网站1]:2016-07-25 21:53:58899,”
“应用程序[web.1]:2016-07-25 21:53:58896允许的主机头:['localhost:5006']
“应用[网站1]:2016-07-25 21:53:58900,”
“应用程序[web.1]:2016-07-25 21:53:58899(“/bokeh_plot/ws.””
“应用[网站1]:2016-07-25 21:53:58899,”
“应用程序[web.1]:2016-07-25 21:53:58899‘bokeh_websocket_path’:‘/bokeh_plot/ws’,”
“应用程序[web.1]:2016-07-25 21:53:58899{‘应用程序上下文’:”
“应用程序[web.1]:2016-07-25 21:53:58900‘博克·韦伯赛克路径’:‘/bokeh赛克图/ws’,”
“app[web.1]:2016-07-25 21:53:58900('/bokeh_plot/autoload.js'”
“应用程序[web.1]:2016-07-25 21:53:58861正在启动进程id为25的Bokeh服务器”
“应用程序[web.1]:2016-07-25 21:53:58900{‘应用程序上下文’:”
“应用程序[web.1]:2016-07-25 21:53:58900‘博克·韦伯赛克路径’:‘/bokeh赛克图/ws’,”
“应用程序[web.1]:2016-07-25 21:53:58901‘使用重定向’:True}”
“附录[web.1]:2016-07-25 21:53:58900(“/?”,”
“app[web.1]:2016-07-25 21:53:58901('/static/(.*)”
“应用[网站1]:2016-07-25 21:53:58901)]”
“应用程序[web.1]:2016-07-25 21:53:58904无法启动Bokeh服务器,端口5006已在使用”
“应用[网站1]:2016-07-25 21:53:58900,”
“应用程序[web.1]:2016-07-25 21:53:58901{'applications':{'bokeh_plot':},”
“应用程序[web.1]:2016-07-25 21:53:58901‘前缀’:”
“应用程序[web.1]:2016-07-25 21:54:13880[pid 25]已连接0个客户端”
“应用程序[web.1]:2016-07-25 21:54:13880[pid 25]/bokeh_绘图有0个会话,其中0个未使用”
“附录[web.1]:2016-07-25 21:54:43870[p
heroku[slug-compiler]: Slug compilation started
heroku[slug-compiler]: Slug compilation finished
heroku[api]: Deploy 9c2fefa by adiadi@gmail.com
heroku[api]: Release v12 created by adiadi@gmail.com
heroku[web.1]: Restarting
heroku[web.1]: State changed from up to starting
heroku[web.1]: Stopping all processes with SIGTERM
app[web.1]: [2016-07-25 21:53:37 +0000] [3] [INFO] Handling signal: term
app[web.1]: [2016-07-25 21:53:37 +0000] [7] [INFO] Worker exiting (pid: 7)
app[web.1]: [2016-07-25 21:53:38 +0000] [3] [INFO] Shutting down: Master
app[web.1]: [2016-07-25 21:53:37 +0000] [8] [INFO] Worker exiting (pid: 8)
heroku[web.1]: Process exited with status 0
heroku[web.1]: Starting process with command `gunicorn app:app`
app[web.1]: [2016-07-25 21:53:53 +0000] [3] [INFO] Starting gunicorn 19.6.0
app[web.1]: [2016-07-25 21:53:53 +0000] [3] [INFO] Using worker: sync
app[web.1]: [2016-07-25 21:53:53 +0000] [8] [INFO] Booting worker with pid: 8
app[web.1]: [2016-07-25 21:53:53 +0000] [7] [INFO] Booting worker with pid: 7
app[web.1]: [2016-07-25 21:53:53 +0000] [3] [INFO] Listening at: http://0.0.0.0:41934 (3)
heroku[web.1]: State changed from starting to up
"app[web.1]: 2016-07-25 21:53:58,821 Allowed Host headers: ['localhost:5006']"
"app[web.1]: 2016-07-25 21:53:58,821 These host origins can connect to the websocket: ['bokehapp.herokuapp.com:80', 'localhost:5006']"
"app[web.1]: 2016-07-25 21:53:58,821 Patterns are:"
"app[web.1]: 2016-07-25 21:53:58,821 Starting Bokeh server version 0.12.0"
"app[web.1]: 2016-07-25 21:53:58,823     {'application_context': <bokeh.server.application_context.ApplicationContext object at 0x7f7bf7dd51d0>,"
"app[web.1]: 2016-07-25 21:53:58,832     <class 'bokeh.server.views.ws.WSHandler'>,"
"app[web.1]: 2016-07-25 21:53:58,832    ('/bokeh_plot/autoload.js',"
"app[web.1]: 2016-07-25 21:53:58,831    ('/bokeh_plot/ws',"
"app[web.1]: 2016-07-25 21:53:58,832     <class 'bokeh.server.views.autoload_js_handler.AutoloadJsHandler'>,"
"app[web.1]: 2016-07-25 21:53:58,832     {'application_context': <bokeh.server.application_context.ApplicationContext object at 0x7f7bf7dd51d0>,"
"app[web.1]: 2016-07-25 21:53:58,832      'bokeh_websocket_path': '/bokeh_plot/ws'}),"
"app[web.1]: 2016-07-25 21:53:58,833     {'applications': {'/bokeh_plot': <bokeh.server.application_context.ApplicationContext object at 0x7f7bf7dd51d0>},"
"app[web.1]: 2016-07-25 21:53:58,823   [('/bokeh_plot/?',"
"app[web.1]: 2016-07-25 21:53:58,823     <class 'bokeh.server.views.doc_handler.DocHandler'>,"
"app[web.1]: 2016-07-25 21:53:58,823      'bokeh_websocket_path': '/bokeh_plot/ws'}),"
"app[web.1]: 2016-07-25 21:53:58,832     {'application_context': <bokeh.server.application_context.ApplicationContext object at 0x7f7bf7dd51d0>,"
"app[web.1]: 2016-07-25 21:53:58,833      'prefix': '',"
"app[web.1]: 2016-07-25 21:53:58,833      'use_redirect': True}),"
"app[web.1]: 2016-07-25 21:53:58,833    ('/static/(.*)',"
"app[web.1]: 2016-07-25 21:53:58,833     <class 'bokeh.server.views.static_handler.StaticHandler'>)]"
"app[web.1]: 2016-07-25 21:53:58,832      'bokeh_websocket_path': '/bokeh_plot/ws'}),"
"app[web.1]: 2016-07-25 21:53:58,861 Starting Bokeh server on port 5006 with applications at paths ['/bokeh_plot']"
"app[web.1]: 2016-07-25 21:53:58,832    ('/?',"
"app[web.1]: 2016-07-25 21:53:58,833     <class 'bokeh.server.views.root_handler.RootHandler'>,"
"app[web.1]: 2016-07-25 21:53:58,896 These host origins can connect to the websocket: ['bokehapp.herokuapp.com:80', 'localhost:5006']"
"app[web.1]: 2016-07-25 21:53:58,898   [('/bokeh_plot/?',"
"app[web.1]: 2016-07-25 21:53:58,899     {'application_context': <bokeh.server.application_context.ApplicationContext object at 0x7f8a84cb4b70>,"
"app[web.1]: 2016-07-25 21:53:58,896 Starting Bokeh server version 0.12.0"
"app[web.1]: 2016-07-25 21:53:58,897 Patterns are:"
"app[web.1]: 2016-07-25 21:53:58,899     <class 'bokeh.server.views.doc_handler.DocHandler'>,"
"app[web.1]: 2016-07-25 21:53:58,896 Allowed Host headers: ['localhost:5006']"
"app[web.1]: 2016-07-25 21:53:58,900     <class 'bokeh.server.views.autoload_js_handler.AutoloadJsHandler'>,"
"app[web.1]: 2016-07-25 21:53:58,899    ('/bokeh_plot/ws',"
"app[web.1]: 2016-07-25 21:53:58,899     <class 'bokeh.server.views.ws.WSHandler'>,"
"app[web.1]: 2016-07-25 21:53:58,899      'bokeh_websocket_path': '/bokeh_plot/ws'}),"
"app[web.1]: 2016-07-25 21:53:58,899     {'application_context': <bokeh.server.application_context.ApplicationContext object at 0x7f8a84cb4b70>,"
"app[web.1]: 2016-07-25 21:53:58,900      'bokeh_websocket_path': '/bokeh_plot/ws'}),"
"app[web.1]: 2016-07-25 21:53:58,900    ('/bokeh_plot/autoload.js',"
"app[web.1]: 2016-07-25 21:53:58,861 Starting Bokeh server with process id: 25"
"app[web.1]: 2016-07-25 21:53:58,900     {'application_context': <bokeh.server.application_context.ApplicationContext object at 0x7f8a84cb4b70>,"
"app[web.1]: 2016-07-25 21:53:58,900      'bokeh_websocket_path': '/bokeh_plot/ws'}),"
"app[web.1]: 2016-07-25 21:53:58,901      'use_redirect': True}),"
"app[web.1]: 2016-07-25 21:53:58,900    ('/?',"
"app[web.1]: 2016-07-25 21:53:58,901    ('/static/(.*)',"
"app[web.1]: 2016-07-25 21:53:58,901     <class 'bokeh.server.views.static_handler.StaticHandler'>)]"
"app[web.1]: 2016-07-25 21:53:58,904 Cannot start Bokeh server, port 5006 is already in use"
"app[web.1]: 2016-07-25 21:53:58,900     <class 'bokeh.server.views.root_handler.RootHandler'>,"
"app[web.1]: 2016-07-25 21:53:58,901     {'applications': {'/bokeh_plot': <bokeh.server.application_context.ApplicationContext object at 0x7f8a84cb4b70>},"
"app[web.1]: 2016-07-25 21:53:58,901      'prefix': '',"
"app[web.1]: 2016-07-25 21:54:13,880 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:54:13,880 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:54:43,870 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:54:43,869 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:54:58,870 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:54:58,869 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:55:13,862 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:55:13,862 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:55:28,864 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:55:28,863 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:55:43,864 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:55:43,865 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:55:58,862 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:55:58,862 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:56:13,876 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:56:13,877 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:56:28,864 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:56:28,865 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:56:43,875 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:56:43,876 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:56:58,872 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:56:58,872 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:57:13,863 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:57:13,862 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:57:28,872 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:57:28,872 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:57:43,868 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:57:43,867 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:57:58,863 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:57:58,864 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:58:13,879 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:58:13,880 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:58:28,873 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:58:28,874 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:58:43,872 [pid 25]   /bokeh_plot has 0 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:58:43,871 [pid 25] 0 clients connected"
"app[web.1]: 2016-07-25 21:58:49,718 WebSocket connection opened"
"app[web.1]: 2016-07-25 21:58:50,223 Sending pull-doc-reply from session 'Q4LGpWidke5G85sboBiRPMazzPfwOwTDMirNrDsTY3OL'"
"app[web.1]: 2016-07-25 21:58:50,177 Receiver created for Protocol('1.0')"
"app[web.1]: 2016-07-25 21:58:50,178 ServerHandler created for Protocol('1.0')"
"app[web.1]: 2016-07-25 21:58:50,178 ServerConnection created"
"heroku[router]: at=info method=GET path=""/"" host=bokehapp.herokuapp.com request_id=15fc6908-1031-4d88-86cc-8048d6195a6f fwd=""109.236.47.207"" dyno=web.1 connect=1ms service=1341ms status=200 bytes=1066"
"app[web.1]: 2016-07-25 21:58:58,864 [pid 25]   /bokeh_plot has 1 sessions with 0 unused"
"app[web.1]: 2016-07-25 21:58:58,863 [pid 25] 1 clients connected"