我在Colab上使用LocalTunnel。直到昨天它都一直工作得很好。但从那以后它就停止工作了。我的代码有这样的结构:
! pip install streamlit -q
然后
%%writefile app.py
import streamlit as st
st.write('# test')
最后
!streamlit run /content/app.py & npx localtunnel --port 8501
我现在得到这样的输出:
Traceback (most recent call last):
File "/usr/local/bin/streamlit", line 5, in <module>
from streamlit.web.cli import main
File "/usr/local/lib/python3.7/dist-packages/streamlit/__init__.py", line 55, in <module>
from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
File "/usr/local/lib/python3.7/dist-packages/streamlit/delta_generator.py", line 45, in <module>
from streamlit.elements.arrow_altair import ArrowAltairMixin
File "/usr/local/lib/python3.7/dist-packages/streamlit/elements/arrow_altair.py", line 42, in <module>
from streamlit.elements.utils import last_index_for_melted_dataframes
File "/usr/local/lib/python3.7/dist-packages/streamlit/elements/utils.py", line 82, in <module>
) -> LabelVisibilityMessage.LabelVisibilityOptions.ValueType:
File "/usr/local/lib/python3.7/dist-packages/google/protobuf/internal/enum_type_wrapper.py", line 115, in __getattr__
self._enum_type.name, name))
AttributeError: Enum LabelVisibilityOptions has no value defined for name 'ValueType'
npx: installed 22 in 4.266s
your url is: https://eight-ties-drop-34-80-129-36.loca.lt
当我跟随链接并点击&;continue&;按钮,页面没有加载,我得到:"504网关超时"。
我可以在输出中看到Enum LabelVisibilityOptions上有一个AttributeError。
我用上面非常简单的代码创建了一个新的笔记本,我得到了同样的错误。
你知道它是从哪里来的吗?如何解决这个问题?提前感谢您的输入!
我得到了同样的错误,我通过回到以前的Streamlit版本来解决它,像这样:
pip install streamlit==1.13.0
你可以在1.14.0版本的更改日志中看到一些关于Enum类的更改。