我正在尝试将Streamlit应用程序部署到Windows。我成功地设置了所有环境和依赖项,并启动了它(有关如何部署应用程序的详细信息,请参阅this question)。但它会立即阻止对凭证的请求。
这是日志:
Welcome to Streamlit!
If you're one of our development partners or you're interested in getting
personal technical support or Streamlit updates, please enter your email
address below. Otherwise, you may leave the field blank.
Email:
2021-10-11 20:56:53.202 WARNING streamlit.config:
Warning: the config option 'server.enableCORS=false' is not compatible with 'server.enableXsrfProtection=true'.
As a result, 'server.enableCORS' is being overridden to 'true'.
More information:
In order to protect against CSRF attacks, we send a cookie with each request.
To do so, we must specify allowable origins, which places a restriction on
cross-origin resource sharing.
If cross origin resource sharing is required, please disable server.enableXsrfProtection.
2021-10-11 20:56:53.202 DEBUG streamlit.logger: Initialized tornado logs
2021-10-11 20:56:53.202 ERROR streamlit.credentials:该应用程序的执行似乎已停止,因为它正在等待一些凭据。我发现可以添加.streamlit/credentials.toml的here,但我不确定windows上的确切位置。我还尝试在启动streamlit时显式添加--server.headless=false,但同样没有效果。
为什么应用程序不能像Linux那样自动启动,显示可以访问应用程序的地址?有没有办法在不需要用户进行额外配置的情况下启动应用程序?
发布于 2021-10-18 19:33:54
问题解决了,我错误地将--server.headless配置设置为false。相反,它必须是true另一个参数才能使部署正常工作:--global.developmentMode=false。
完全解析here。
https://stackoverflow.com/questions/69545743
复制相似问题