Python 在heroku上部署时,仪表板的内容不会显示

Python 在heroku上部署时,仪表板的内容不会显示,python,python-3.x,plotly-dash,Python,Python 3.x,Plotly Dash,我有一个仪表板,看起来像这样 我使用相同的代码在heroku上部署它。但现在不会显示所有后续分区 这样的错误正常吗?我的申请有什么问题?任何建议都会很有帮助 服务器错误包括在下面: ImportError: Missing optional dependency 'xlrd'. Install xlrd >= 1.0.0 for Excel support Use pip or conda to install xlrd. 2020-07-06T09:43:04.129612+00:00

我有一个仪表板,看起来像这样

我使用相同的代码在heroku上部署它。但现在不会显示所有后续分区

这样的错误正常吗?我的申请有什么问题?任何建议都会很有帮助

服务器错误包括在下面:

ImportError: Missing optional dependency 'xlrd'. Install xlrd >= 1.0.0 for Excel support Use pip or conda to install xlrd.

2020-07-06T09:43:04.129612+00:00 app[web.1]: 10.30.119.250 - - [06/Jul/2020:09:43:04 +0000] "POST /_dash-update-component HTTP/1.1" 500 290 "https://villages-india-dashboard.herokuapp.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36"
2020-07-06T09:43:04.130124+00:00 heroku[router]: at=info method=POST path="/_dash-update-component" host=villages-india-dashboard.herokuapp.com request_id=19c8d83c-98fe-45de-b383-05faa6063975 fwd="103.125.155.242" dyno=web.1 connect=1ms service=5ms status=500 bytes=470 protocol=https

如果某些东西不起作用,那么


  • 检查您的服务器日志并查找是否引发了任何异常
  • 在您的例子中,有一个库丢失了,即
    xlrd
  • 运行
    pip安装xlrd
  • 重新启动应用程序
  • 如果您正在运行web应用程序,那么最好使用
    virtualenv
    conda
    环境和包含所有依赖项的
    requirements.txt


    在运行应用程序之前,请执行
    pip install-r requirements.txt
    ,以便正确安装所有要求

    检查您的服务器日志谢谢回复,我查看了日志,似乎有一些错误。但是我不明白它是什么,我会把它包括在问题中。把错误包括在问题中。在服务器中安装pip-install-xlrd我会把它写下来作为一个答案,这样其他遇到同样问题的人就可以通过一个综合的答案而不是评论
    2020-07-06T09:43:04.123913+00:00 app[web.1]: ImportError: Missing optional dependency 'xlrd'. Install xlrd >= 1.0.0 for Excel support Use pip or conda to install xlrd.
    2020-07-06T09:43:04.123931+00:00 heroku[router]: at=info method=POST path="/_dash-update-component" host=villages-india-dashboard.herokuapp.com request_id=134a6cd3-834c-47b9-a8e1-7aaef08af483 fwd="103.125.155.242" dyno=web.1 connect=1ms service=4ms status=500 bytes=470 protocol=https
    2020-07-06T09:43:04.124736+00:00 app[web.1]: 10.30.238.92 - - [06/Jul/2020:09:43:04 +0000] "POST /_dash-update-component HTTP/1.1" 500 290 "https://villages-india-dashboard.herokuapp.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36"
    
    2020-07-06T09:43:04.122205+00:00 app[web.1]: ImportError: Missing optional dependency 'xlrd'. Install xlrd >= 1.0.0 for Excel support Use pip or conda to install xlrd.
    2020-07-06T09:43:04.122553+00:00 heroku[router]: at=info method=POST path="/_dash-update-component" host=villages-india-dashboard.herokuapp.com request_id=e97ce186-b12c-425d-8ebf-a4266624f241 fwd="103.125.155.242" dyno=web.1 connect=0ms service=3ms status=500 bytes=470 protocol=https
    2020-07-06T09:43:04.122945+00:00 app[web.1]: 10.29.116.130 - - [06/Jul/2020:09:43:04 +0000] "POST /_dash-update-component HTTP/1.1" 500 290 "https://villages-india-dashboard.herokuapp.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36"
    
    2020-07-06T09:43:03.742186+00:00 app[web.1]: 10.5.185.29 - - [06/Jul/2020:09:43:03 +0000] "POST /_dash-update-component HTTP/1.1" 500 290 "https://villages-india-dashboard.herokuapp.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36"
    2020-07-06T09:43:03.742413+00:00 heroku[router]: at=info method=POST path="/_dash-update-component" host=villages-india-dashboard.herokuapp.com request_id=78a47588-822c-45e7-9689-83e65ceaad54 fwd="103.125.155.242" dyno=web.1 connect=1ms service=5ms status=500 bytes=470 protocol=https
    2020-07-06T09:43:03.742473+00:00 app[web.1]: 10.171.23.45 - - [06/Jul/2020:09:43:03 +0000] "POST /_dash-update-component HTTP/1.1" 500 290 "https://villages-india-dashboard.herokuapp.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36"
    2020-07-06T09:43:03.746077+00:00 heroku[router]: at=info method=POST path="/_dash-update-component" host=villages-india-dashboard.herokuapp.com request_id=78a48ccd-f8c4-458a-b091-20507030c457 fwd="103.125.155.242" dyno=web.1 connect=1ms service=9ms status=500 bytes=470 protocol=https