【发布时间】:2020-11-12 10:47:06
【问题描述】:
这是我第一次尝试使用 Streamlit 或 Heroku。我的应用使用 Streamlit 在本地运行,但在使用 Heroku 发布应用后尝试打开应用时遇到此错误:
2020-07-22T19:20:13.577096+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=ewan-app.herokuapp .com request_id=99a5e93d-8caa-458a-bf01-fae69aaa46e9 fwd="81.156.68.48" dyno= connect= service= status=503 bytes= protocol=https
2020-07-22T19:20:13.791262+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=ewan- app.herokuapp.com request_id=e4eea2e8-4fe3-46c4-996e-0d463bb36de0 fwd="81.156.68.48" dyno= connect= service= status=503 bytes= protocol=https
当我将应用脚本更改为以下内容时,也会发生同样的事情:
import streamlit as st
st.write("Hello world!")
所以我猜这是由于其他文件之一。我有 requirements.txt:
streamlit==0.63.1
过程文件:
web:sh setup.sh && streamlit run app.py
setup.sh:
mkdir -p ~/.streamlit
echo "[server]
headless = true
port = $PORT
enableCORS = false
" > ~/.streamlit/config.toml
我尝试了一些我发现的不同建议,比如删除 Procfile 中 web: 和 sh 之间的空格,并在 setup.sh 中尝试了不同的布局,但到目前为止没有运气。任何建议将不胜感激。
【问题讨论】: