【问题标题】:localtunnel don't generate url to google colablocaltunnel 不生成 url 到 google colab
【发布时间】:2022-11-18 22:38:06
【问题描述】:
在 google colab 上,我安装了 streamlit,创建了一个简单的 app.py 并尝试使用 localtunnel 对其进行测试,但没有出现 localtunnel 链接。
我使用的代码是:
第一的:
! pip install streamlit -q
后:
%%writefile app.py
import streamlit as st
st.write('# test')
最后:
!streamlit run /content/app.py & npx localtunnel --port 8501
结果应显示 localtunnel url 但仅显示:
2022-07-15 19:26:00.602 信息 numexpr.utils:NumExpr 默认为 2 个线程。
您现在可以在浏览器中查看您的 Streamlit 应用程序。
网络网址:http://172.28.0.2:8501
外部网址:http://35.196.140.5:8501
npx:在 4.802s 中安装了 22 个
【问题讨论】:
标签:
google-colaboratory
streamlit
localtunnel
【解决方案1】:
点击here!
如果我今天尝试过它,这可以解决问题。
【解决方案2】:
我有同样的问题。
完全相同的代码结构,直到今天早上它都运行良好。
我现在有这条消息:
回溯(最后一次通话):
文件“/usr/local/bin/streamlit”,第 5 行,位于
从 streamlit.web.cli 导入主
文件“/usr/local/lib/python3.7/dist-packages/streamlit/在里面.py”,第 55 行,在
从 streamlit.delta_generator 将 DeltaGenerator 导入为 _DeltaGenerator
文件“/usr/local/lib/python3.7/dist-packages/streamlit/delta_generator.py”,第 45 行,位于
从 streamlit.elements.arrow_altair 导入 ArrowAltairMixin
文件“/usr/local/lib/python3.7/dist-packages/streamlit/elements/arrow_altair.py”,第 42 行,位于
从 streamlit.elements.utils 导入 last_index_for_melted_dataframes
文件“/usr/local/lib/python3.7/dist-packages/streamlit/elements/utils.py”,第 82 行,位于
) -> LabelVisibilityMessage.LabelVisibilityOptions.ValueType:
文件“/usr/local/lib/python3.7/dist-packages/google/protobuf/internal/enum_type_wrapper.py”,第 115 行,在获取属性self._enum_type.name, 名称))AttributeError:枚举 LabelVisibilityOptions 没有为名称“ValueType”定义的值
npx:在 2.638 秒内安装了 22 个你的网址是:https://purple-papers-accept-34-83-8-146.loca.lt
^C
并且没有网络 URL 或外部 URL。
当我点击链接并点击“继续”时,页面没有加载,我得到:“504 网关超时”。