Patty
Patty

Reputation: 1

Streamlit via Google Colab through LocalTunnel does not work anymore

I am using LocalTunnel on Colab. It worked perfectly until yesterday. But it stopped working since. My code has this structure :

! pip install streamlit -q

Then

%%writefile app.py
import streamlit as st
st.write('# test')

Finally

!streamlit run /content/app.py & npx localtunnel --port 8501

I now get this output :

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

When I follow the link and click on the "continue" button, the page does not load and I get: "504 Gateway Time-out".

I can see on the output that there is an AttributeError on Enum LabelVisibilityOptions.

I created a new notebook with a very simple code as above and I get the same error.

Any idea where it comes from? And how to fix this? Thanks in advance for your input!

Upvotes: 0

Views: 3532

Answers (1)

Owen Harris
Owen Harris

Reputation: 21

I was getting the same error, I resolved it by going back to a previous version of Streamlit like so:

pip install streamlit==1.13.0

You can see in the changelog that with version 1.14.0 some changes were made regarding Enum classes.

Upvotes: 2

Related Questions