AttributeError: 'NoneType' object has no attribute 'message_types_by_name'

Hi guys, how are you? I’m working with a streamlit app that was working fine till yesterday.

Today, I get this error message every time:

Traceback (most recent call last):
  File "C:\Users\User\Desktop\Sistema\App\Home.py", line 6, in <module>
    import streamlit as st
  File "C:\Users\User\anaconda3\lib\site-packages\streamlit\__init__.py", line 55, in <module>
    from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
  File "C:\Users\User\anaconda3\lib\site-packages\streamlit\delta_generator.py", line 38, in <module>
    from streamlit import config, cursor, env_util, logger, runtime, type_util, util
  File "C:\Users\User\anaconda3\lib\site-packages\streamlit\cursor.py", line 18, in <module>
    from streamlit.runtime.scriptrunner import get_script_run_ctx
  File "C:\Users\User\anaconda3\lib\site-packages\streamlit\runtime\__init__.py", line 16, in <module>
    from streamlit.runtime.runtime import Runtime as Runtime
  File "C:\Users\User\anaconda3\lib\site-packages\streamlit\runtime\runtime.py", line 26, in <module>
    from streamlit.proto.BackMsg_pb2 import BackMsg
  File "C:\Users\User\anaconda3\lib\site-packages\streamlit\proto\BackMsg_pb2.py", line 15, in <module>
    from streamlit.proto import ClientState_pb2 as streamlit_dot_proto_dot_ClientState__pb2
  File "C:\Users\User\anaconda3\lib\site-packages\streamlit\proto\ClientState_pb2.py", line 15, in <module>
    from streamlit.proto import WidgetStates_pb2 as streamlit_dot_proto_dot_WidgetStates__pb2
  File "C:\Users\User\anaconda3\lib\site-packages\streamlit\proto\WidgetStates_pb2.py", line 15, in <module>
    from streamlit.proto import Common_pb2 as streamlit_dot_proto_dot_Common__pb2
  File "C:\Users\User\anaconda3\lib\site-packages\streamlit\proto\Common_pb2.py", line 21, in <module>
    _STRINGARRAY = DESCRIPTOR.message_types_by_name['StringArray']
AttributeError: 'NoneType' object has no attribute 'message_types_by_name'

I realized today that the problem is in importing the streamlit library… Could someone help me?

Hey @Jean,

Thanks for sharing your question! Please review our posting guidelines and edit your question to include a code snippet so we can reproduce the issue.

Streamlit requires protobuf<4,>=3.12, make sure you don’t have an incompatible version installed.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.