weixin_39782752
weixin_39782752
2020-12-08 19:11

python 3.6.12 builds blank heroku app

ALL software version info

macOS Mojave Version 10.14 Google Chrome Version 86.0.4240.111 (Official Build) (x86_64)

Local versions:

python 3.7.9 all others: see conda list below

Heroku build versions:

python 3.6.12 (default) all others: see heroku build log below

Description of expected behavior and the observed behavior

The mininal-heroku-demo should built a functioning web deployment of a panel app via heroku.

Heroku's default build using python 3.6.12 produces a nominally successful build, according to the log, but the resulting web app is just a blank white page.

This issue can be patched by explicit python versioning for the heroku build, as described in this PR for the minimal-heroku-demo.

On this discourse thread, suggested this may be indicative of a bug, given that panel supports python 3.6.

Code, screenshots, and heroku build log provided below.

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


$ git clone https://github.com/holoviz-demos/minimal-heroku-demo
$ cd minimal-heroku-demo
$ panel serve iris_kmeans.ipynb

* the panel looks good locally * Screen Shot 2020-11-14 at 10 42 33 AM

*creating a new heroku app *


$ heroku create py3612-bug

*editing Procfile according to instructions in minimal-heroku-demo README.md and deploying via heroku *


$ cat Procfile
web: panel serve --address="0.0.0.0" --port=$PORT iris_kmeans.ipynb --allow-websocket-origin=py3612-bug.herokuapp.com
$ git push heroku master

*the resulting heroku app is a blank white page * Screen Shot 2020-11-14 at 10 30 12 AM

Note that explicit python versioning, as described in the PR linked above and again here, does resolve this issue. I emphasize this again simply as it may provide some clue as to what the failure mode is.

Below is the heroku build log which produced the blank panel app, followed by the results of conda list for the local env from which panel serve produced a functioning local deployment.

Heroku build log


remote: Building source:
remote: 
remote: -----> Python app detected
remote: -----> Installing python-3.6.12
remote: -----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        Collecting panel
remote:          Downloading panel-0.10.1-py2.py3-none-any.whl (5.9 MB)
remote:        Collecting hvplot
remote:          Downloading hvplot-0.6.0-py2.py3-none-any.whl (3.0 MB)
remote:        Collecting scikit-learn
remote:          Downloading scikit_learn-0.23.2-cp36-cp36m-manylinux1_x86_64.whl (6.8 MB)
remote:        Collecting nbconvert
remote:          Downloading nbconvert-6.0.7-py3-none-any.whl (552 kB)
remote:        Collecting tqdm
remote:          Downloading tqdm-4.51.0-py2.py3-none-any.whl (70 kB)
remote:        Collecting bokeh>=2.2.2
remote:          Downloading bokeh-2.2.3.tar.gz (8.8 MB)
remote:        Collecting pyviz-comms>=0.7.4
remote:          Downloading pyviz_comms-0.7.6-py2.py3-none-any.whl (10 kB)
remote:        Collecting param>=1.9.3
remote:          Downloading param-1.10.0-py2.py3-none-any.whl (75 kB)
remote:        Collecting pyct>=0.4.4
remote:          Downloading pyct-0.4.8-py2.py3-none-any.whl (15 kB)
remote:        Collecting markdown
remote:          Downloading Markdown-3.3.3-py3-none-any.whl (96 kB)
remote:        Collecting requests
remote:          Downloading requests-2.25.0-py2.py3-none-any.whl (61 kB)
remote:        Collecting pandas
remote:          Downloading pandas-1.1.4-cp36-cp36m-manylinux1_x86_64.whl (9.5 MB)
remote:        Collecting holoviews>=1.11.0
remote:          Downloading holoviews-1.13.5-py2.py3-none-any.whl (4.2 MB)
remote:        Collecting numpy>=1.15
remote:          Downloading numpy-1.19.4-cp36-cp36m-manylinux2010_x86_64.whl (14.5 MB)
remote:        Collecting colorcet>=2
remote:          Downloading colorcet-2.0.2-py2.py3-none-any.whl (1.6 MB)
remote:        Collecting joblib>=0.11
remote:          Downloading joblib-0.17.0-py3-none-any.whl (301 kB)
remote:        Collecting scipy>=0.19.1
remote:          Downloading scipy-1.5.4-cp36-cp36m-manylinux1_x86_64.whl (25.9 MB)
remote:        Collecting threadpoolctl>=2.0.0
remote:          Downloading threadpoolctl-2.1.0-py3-none-any.whl (12 kB)
remote:        Collecting mistune<2,>=0.8.1
remote:          Downloading mistune-0.8.4-py2.py3-none-any.whl (16 kB)
remote:        Collecting entrypoints>=0.2.2
remote:          Downloading entrypoints-0.3-py2.py3-none-any.whl (11 kB)
remote:        Collecting pandocfilters>=1.4.1
remote:          Downloading pandocfilters-1.4.3.tar.gz (16 kB)
remote:        Collecting nbformat>=4.4
remote:          Downloading nbformat-5.0.8-py3-none-any.whl (172 kB)
remote:        Collecting bleach
remote:          Downloading bleach-3.2.1-py2.py3-none-any.whl (145 kB)
remote:        Collecting jupyter-core
remote:          Downloading jupyter_core-4.6.3-py2.py3-none-any.whl (83 kB)
remote:        Collecting jupyterlab-pygments
remote:          Downloading jupyterlab_pygments-0.1.2-py2.py3-none-any.whl (4.6 kB)
remote:        Collecting pygments>=2.4.1
remote:          Downloading Pygments-2.7.2-py3-none-any.whl (948 kB)
remote:        Collecting jinja2>=2.4
remote:          Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
remote:        Collecting traitlets>=4.2
remote:          Downloading traitlets-4.3.3-py2.py3-none-any.whl (75 kB)
remote:        Collecting testpath
remote:          Downloading testpath-0.4.4-py2.py3-none-any.whl (163 kB)
remote:        Collecting nbclient<0.6.0,>=0.5.0
remote:          Downloading nbclient-0.5.1-py3-none-any.whl (65 kB)
remote:        Collecting defusedxml
remote:          Downloading defusedxml-0.6.0-py2.py3-none-any.whl (23 kB)
remote:        Collecting PyYAML>=3.10
remote:          Downloading PyYAML-5.3.1.tar.gz (269 kB)
remote:        Collecting python-dateutil>=2.1
remote:          Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB
remote:        Collecting pillow>=7.1.0
remote:          Downloading Pillow-8.0.1-cp36-cp36m-manylinux1_x86_64.whl (2.2 MB)
remote:        Collecting packaging>=16.8
remote:          Downloading packaging-20.4-py2.py3-none-any.whl (37 kB)
remote:        Collecting tornado>=5.1
remote:          Downloading tornado-6.1-cp36-cp36m-manylinux2010_x86_64.whl (427 kB)
remote:        Collecting typing_extensions>=3.7.4
remote:          Downloading typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
remote:        Collecting importlib-metadata; python_version < "3.8"
remote:          Downloading importlib_metadata-2.0.0-py2.py3-none-any.whl (31 kB)
remote:        Collecting idna<3,>=2.5
remote:          Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
remote:        Collecting certifi>=2017.4.17
remote:          Downloading certifi-2020.11.8-py2.py3-none-any.whl (155 kB)
remote:        Collecting chardet<4,>=3.0.2
remote:          Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
remote:        Collecting urllib3<1.27,>=1.21.1
remote:          Downloading urllib3-1.26.2-py2.py3-none-any.whl (136 kB)
remote:        Collecting pytz>=2017.2
remote:          Downloading pytz-2020.4-py2.py3-none-any.whl (509 kB)
remote:        Collecting ipython-genutils
remote:          Downloading ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB
remote:        Collecting jsonschema!=2.5.0,>=2.4
remote:          Downloading jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
remote:        Collecting six>=1.9.0
remote:          Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
remote:        Collecting webencodings
remote:          Downloading webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
remote:        Collecting MarkupSafe>=0.23
remote:          Downloading MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl (27 kB)
remote:        Collecting decorator
remote:          Downloading decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
remote:        Collecting nest-asyncio
remote:          Downloading nest_asyncio-1.4.3-py3-none-any.whl (5.3 kB)
remote:        Collecting jupyter-client>=6.1.5
remote:          Downloading jupyter_client-6.1.7-py3-none-any.whl (108 kB)
remote:        Collecting async-generator
remote:          Downloading async_generator-1.10-py3-none-any.whl (18 kB)
remote:        Collecting pyparsing>=2.0.2
remote:          Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
remote:        Collecting zipp>=0.5
remote:          Downloading zipp-3.4.0-py3-none-any.whl (5.2 kB)
remote:        Collecting pyrsistent>=0.14.0
remote:          Downloading pyrsistent-0.17.3.tar.gz (106 kB)
remote:        Collecting attrs>=17.4.0
remote:          Downloading attrs-20.3.0-py2.py3-none-any.whl (49 kB)
remote:        Collecting pyzmq>=13
remote:          Downloading pyzmq-20.0.0-cp36-cp36m-manylinux1_x86_64.whl (1.1 MB)
remote:        Building wheels for collected packages: bokeh, pandocfilters, PyYAML, pyrsistent
remote:          Building wheel for bokeh (setup.py): started
remote:          Building wheel for bokeh (setup.py): finished with status 'done'
remote:          Created wheel for bokeh: filename=bokeh-2.2.3-py3-none-any.whl size=9296309 sha256=d867fe4ccfa1c6982b4c7252a204a1667da0bfb01950791779d7e97af77a9c71
remote:          Stored in directory: /tmp/pip-ephem-wheel-cache-4_fj8pzq/wheels/36/60/6b/2a439a4e4b2cb34846f97b81687bc8a6bb3a96c5574fb5dd6c
remote:          Building wheel for pandocfilters (setup.py): started
remote:          Building wheel for pandocfilters (setup.py): finished with status 'done'
remote:          Created wheel for pandocfilters: filename=pandocfilters-1.4.3-py3-none-any.whl size=7991 sha256=ede3e129a546b3af6ac574cc96fd904eb82f283a41226cb556de1f1cfb09454a
remote:          Stored in directory: /tmp/pip-ephem-wheel-cache-4_fj8pzq/wheels/12/12/89/fe63ac4d6ee6440daab4db77b78c63f7f192b700f844b6639f
remote:          Building wheel for PyYAML (setup.py): started
remote:          Building wheel for PyYAML (setup.py): finished with status 'done'
remote:          Created wheel for PyYAML: filename=PyYAML-5.3.1-cp36-cp36m-linux_x86_64.whl size=402163 sha256=cc34d94a29f44d8fa3a8570c1f39584f40783034201ac5ce1499acb70ad2e717
remote:          Stored in directory: /tmp/pip-ephem-wheel-cache-4_fj8pzq/wheels/e5/9d/ad/2ee53cf262cba1ffd8afe1487eef788ea3f260b7e6232a80fc
remote:          Building wheel for pyrsistent (setup.py): started
remote:          Building wheel for pyrsistent (setup.py): finished with status 'done'
remote:          Created wheel for pyrsistent: filename=pyrsistent-0.17.3-cp36-cp36m-linux_x86_64.whl size=114346 sha256=ee7357fda3b7b6337b1a719ed7d54fae54e34958f8c44d73f7bbc618322a177b
remote:          Stored in directory: /tmp/pip-ephem-wheel-cache-4_fj8pzq/wheels/34/13/19/294da8e11bce7e563afee51251b9fa878185e14f4b5caf00cb
remote:        Successfully built bokeh pandocfilters PyYAML pyrsistent
remote:        Installing collected packages: tqdm, PyYAML, six, python-dateutil, MarkupSafe, jinja2, numpy, pillow, pyparsing, packaging, tornado, typing-extensions, bokeh, param, pyviz-comms, pyct, zipp, importlib-metadata, markdown, idna, certifi, chardet, urllib3, requests, panel, pytz, pandas, holoviews, colorcet, hvplot, joblib, scipy, threadpoolctl, scikit-learn, mistune, entrypoints, pandocfilters, decorator, ipython-genutils, traitlets, jupyter-core, pyrsistent, attrs, jsonschema, nbformat, webencodings, bleach, pygments, jupyterlab-pygments, testpath, nest-asyncio, pyzmq, jupyter-client, async-generator, nbclient, defusedxml, nbconvert
remote:        Successfully installed MarkupSafe-1.1.1 PyYAML-5.3.1 async-generator-1.10 attrs-20.3.0 bleach-3.2.1 bokeh-2.2.3 certifi-2020.11.8 chardet-3.0.4 colorcet-2.0.2 decorator-4.4.2 defusedxml-0.6.0 entrypoints-0.3 holoviews-1.13.5 hvplot-0.6.0 idna-2.10 importlib-metadata-2.0.0 ipython-genutils-0.2.0 jinja2-2.11.2 joblib-0.17.0 jsonschema-3.2.0 jupyter-client-6.1.7 jupyter-core-4.6.3 jupyterlab-pygments-0.1.2 markdown-3.3.3 mistune-0.8.4 nbclient-0.5.1 nbconvert-6.0.7 nbformat-5.0.8 nest-asyncio-1.4.3 numpy-1.19.4 packaging-20.4 pandas-1.1.4 pandocfilters-1.4.3 panel-0.10.1 param-1.10.0 pillow-8.0.1 pyct-0.4.8 pygments-2.7.2 pyparsing-2.4.7 pyrsistent-0.17.3 python-dateutil-2.8.1 pytz-2020.4 pyviz-comms-0.7.6 pyzmq-20.0.0 requests-2.25.0 scikit-learn-0.23.2 scipy-1.5.4 six-1.15.0 testpath-0.4.4 threadpoolctl-2.1.0 tornado-6.1 tqdm-4.51.0 traitlets-4.3.3 typing-extensions-3.7.4.3 urllib3-1.26.2 webencodings-0.5.1 zipp-3.4.0
remote: -----> Discovering process types
remote:        Procfile declares types -> web
remote: 
remote: -----> Compressing...
remote:        Done: 144.9M
remote: -----> Launching...
remote:        Released v3
remote:        https://py3612-bug.herokuapp.com/ deployed to Heroku
remote: 
remote: Verifying deploy... done.

Local env versions

For comparison, here are all of the packages installed in the conda env from which the local deployment was successfully run:


# Name                    Version                   Build  Channel
appnope                   0.1.0                    py37_0  
argon2-cffi               20.1.0           py37haf1e3a3_1  
async_generator           1.10             py37h28b3542_0  
attrs                     20.3.0             pyhd3eb1b0_0  
backcall                  0.2.0                      py_0  
blas                      1.0                         mkl  
bleach                    3.2.1                      py_0  
bokeh                     2.2.3                    py37_0  
brotlipy                  0.7.0           py37haf1e3a3_1000  
ca-certificates           2020.10.14                    0  
certifi                   2020.6.20          pyhd3eb1b0_3  
cffi                      1.14.3           py37hed5b41f_0  
chardet                   3.0.4                 py37_1003  
colorcet                  2.0.2                      py_0  
cryptography              3.1.1            py37hddc9c9b_0  
cycler                    0.10.0                   py37_0  
decorator                 4.4.2                      py_0  
defusedxml                0.6.0                      py_0  
entrypoints               0.3                      py37_0  
freetype                  2.10.4               ha233b18_0  
holoviews                 1.13.5             pyhd3eb1b0_0  
hvplot                    0.6.0                      py_1  
idna                      2.10                       py_0  
importlib-metadata        2.0.0                      py_1  
importlib_metadata        2.0.0                         1  
intel-openmp              2019.4                      233  
ipykernel                 5.3.4            py37h5ca1d4c_0  
ipython                   7.19.0           py37h01d92e1_0  
ipython_genutils          0.2.0                    py37_0  
jedi                      0.17.2                   py37_0  
jinja2                    2.11.2                     py_0  
joblib                    0.17.0                     py_0  
jpeg                      9b                   he5867d9_2  
jsonschema                3.2.0                      py_2  
jupyter_client            6.1.7                      py_0  
jupyter_core              4.6.3                    py37_0  
jupyterlab_pygments       0.1.2                      py_0  
kiwisolver                1.3.0            py37h23ab428_0  
lcms2                     2.11                 h92f6f08_0  
libcxx                    10.0.0                        1  
libedit                   3.1.20191231         h1de35cc_1  
libffi                    3.3                  hb1e8313_2  
libgfortran               3.0.1                h93005f0_2  
libpng                    1.6.37               ha441bb4_0  
libsodium                 1.0.18               h1de35cc_0  
libtiff                   4.1.0                hcb84e12_1  
llvm-openmp               10.0.0               h28b9765_0  
lz4-c                     1.9.2                h79c402e_3  
markdown                  3.3.3            py37hecd8cb5_0  
markupsafe                1.1.1            py37h1de35cc_0  
matplotlib-base           3.3.2            py37h181983e_0  
mistune                   0.8.4            py37h1de35cc_0  
mkl                       2019.4                      233  
mkl-service               2.3.0            py37hfbe908c_0  
mkl_fft                   1.2.0            py37hc64f4ea_0  
mkl_random                1.1.1            py37h959d312_0  
nbclient                  0.5.1                      py_0  
nbconvert                 6.0.7                    py37_0  
nbformat                  5.0.8                      py_0  
ncurses                   6.2                  h0a44026_1  
nest-asyncio              1.4.2              pyhd3eb1b0_0  
notebook                  6.1.4                    py37_0  
numpy                     1.19.2           py37h456fd55_0  
numpy-base                1.19.2           py37hcfb5961_0  
olefile                   0.46                     py37_0  
openssl                   1.1.1h               haf1e3a3_0  
packaging                 20.4                       py_0  
pandas                    1.1.3            py37hb1e8313_0  
pandoc                    2.11                 h0dc7051_0  
pandocfilters             1.4.3            py37hecd8cb5_1  
panel                     0.9.7                      py_0  
param                     1.10.0                     py_0    pyviz
parso                     0.7.0                      py_0  
pexpect                   4.8.0                    py37_0  
pickleshare               0.7.5                    py37_0  
pillow                    8.0.1            py37h5270095_0  
pip                       20.2.4           py37hecd8cb5_0  
prometheus_client         0.8.0                      py_0  
prompt-toolkit            3.0.8                      py_0  
ptyprocess                0.6.0                    py37_0  
pycparser                 2.20                       py_2  
pyct                      0.4.8                      py_0    pyviz
pyct-core                 0.4.8                      py_0    pyviz
pygments                  2.7.2              pyhd3eb1b0_0  
pyopenssl                 19.1.0                     py_1  
pyparsing                 2.4.7                      py_0  
pyrsistent                0.17.3           py37haf1e3a3_0  
pysocks                   1.7.1                    py37_0  
python                    3.7.9                h26836e1_0  
python-dateutil           2.8.1                      py_0  
pytz                      2020.1                     py_0  
pyviz_comms               0.7.6                      py_0    pyviz
pyyaml                    5.3.1            py37haf1e3a3_1  
pyzmq                     19.0.2           py37hb1e8313_1  
readline                  8.0                  h1de35cc_0  
requests                  2.24.0                     py_0  
scikit-learn              0.23.2           py37h959d312_0  
scipy                     1.5.2            py37h912ce22_0  
send2trash                1.5.0                    py37_0  
setuptools                50.3.1           py37hecd8cb5_1  
six                       1.15.0           py37hecd8cb5_0  
sqlite                    3.33.0               hffcf06c_0  
terminado                 0.9.1                    py37_0  
testpath                  0.4.4                      py_0  
threadpoolctl             2.1.0              pyh5ca1d4c_0  
tk                        8.6.10               hb0a8c7a_0  
tornado                   6.0.4            py37h1de35cc_1  
tqdm                      4.50.2                     py_0  
traitlets                 5.0.5                      py_0  
typing_extensions         3.7.4.3                    py_0  
urllib3                   1.25.11                    py_0  
wcwidth                   0.2.5                      py_0  
webencodings              0.5.1                    py37_1  
wheel                     0.35.1                     py_0  
xz                        5.2.5                h1de35cc_0  
yaml                      0.2.5                haf1e3a3_0  
zeromq                    4.3.3                hb1e8313_3  
zipp                      3.4.0              pyhd3eb1b0_0  
zlib                      1.2.11               h1de35cc_3  
zstd                      1.4.5                h41d2c2f_0  

Screenshots or screencasts of the bug in action

Provided in-line above.

该提问来源于开源项目:holoviz/panel

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_40007668 weixin_40007668 5月前

    Any errors in the browser console in the served app?

    点赞 评论 复制链接分享
  • weixin_39782752 weixin_39782752 5月前

    Yes, three errors, which appear to all be the same, but pasting all three, in case there's some subtle difference that I'm overlooking.

    
    bokeh.min.js?v=c77564ca8be6e4b5a67648d980fe180d62bd99ccfc01bd272a3e708b9533f34b1c86b24a1a28c86555f838fa26e429697aad84c411cac25f0472231ed56f1eab:575 
    
    WebSocket connection to 'ws://py3612-bug.herokuapp.com/iris_kmeans/ws' failed: Error during WebSocket handshake: Unexpected response code: 403
    connect @ bokeh.min.js?v=c77564ca8be6e4b5a67648d980fe180d62bd99ccfc01bd272a3e708b9533f34b1c86b24a1a28c86555f838fa26e429697aad84c411cac25f0472231ed56f1eab:575
    
    
    bokeh.min.js?v=c77564ca8be6e4b5a67648d980fe180d62bd99ccfc01bd272a3e708b9533f34b1c86b24a1a28c86555f838fa26e429697aad84c411cac25f0472231ed56f1eab:575 
    
    WebSocket connection to 'ws://py3612-bug.herokuapp.com/iris_kmeans/ws' failed: Error during WebSocket handshake: Unexpected response code: 403
    connect @ bokeh.min.js?v=c77564ca8be6e4b5a67648d980fe180d62bd99ccfc01bd272a3e708b9533f34b1c86b24a1a28c86555f838fa26e429697aad84c411cac25f0472231ed56f1eab:575
    
    
    bokeh.min.js?v=c77564ca8be6e4b5a67648d980fe180d62bd99ccfc01bd272a3e708b9533f34b1c86b24a1a28c86555f838fa26e429697aad84c411cac25f0472231ed56f1eab:575 
    
    WebSocket connection to 'ws://py3612-bug.herokuapp.com/iris_kmeans/ws' failed: Error during WebSocket handshake: Unexpected response code: 403
    connect @ bokeh.min.js?v=c77564ca8be6e4b5a67648d980fe180d62bd99ccfc01bd272a3e708b9533f34b1c86b24a1a28c86555f838fa26e429697aad84c411cac25f0472231ed56f1eab:575
    
    
    点赞 评论 复制链接分享
  • weixin_39636696 weixin_39636696 5月前

    I'm not quite clear whether this is really a panel issue or an issue with the example.

    I thought we were no longer using holoviz-demos. If that is true, we should archive all those repos (and move anything useful to pyviz-topics).

    点赞 评论 复制链接分享
  • weixin_39920415 weixin_39920415 5月前

    I see no reason to continue having that separate repo.

    点赞 评论 复制链接分享

相关推荐