检索 Streamlit 应用程序的 URL¶
先决条件
- Streamlit 应用程序必须已经上传到您当前使用的连接中的某个暂存区。
- 您当前的 ROLE 必须有权访问应用程序。
如何获取已部署的 Streamlit 应用程序的 URL¶
The snow streamlit get-url command returns a URL for a deployed Streamlit app that you can then use to open the app in a browser.
要获取应用程序 URL,请执行以下操作:
-
确保连接指定了部署应用程序的数据库和架构。
-
请输入类似下面的命令:
You can use the command to return the URL and open the app automatically in your default browser by using the --open option, similar to the following:
如何解决常见错误
-
如果命令失败是因为您的 ROLE 无权访问 Streamlit 应用程序,请尝试以下操作:
- 验证您在浏览器中使用的 ROLE 与部署应用程序时使用的相同。
- Switch to a ROLE that has access to the app. If you don’t have access to the ROLE used to create the app, the app developer can grant access to another ROLE with the
snow streamlit sharecommand.
-
如果命令因找不到 Streamlit 应用程序而失败,请尝试以下操作:
- 检查应用程序名称。
- 验证您使用部署应用程序的相同连接(主机、账户、数据库和架构)生成了 URL。
- 确保数据库和架构正确无误。如果您将数据库和架构指定为完全限定名称,则会替换连接中它们的值。