Error during running streamlit app

Dear Viewer

It would be really appreciable from my side if anyone can help me out for this.

I am getting following errors after running my file “hello.py” which is a streamlit web application on cmd.

C:\Users\User\Desktop>streamlit run hello.py
Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\Scripts\streamlit.exe\__main__.py", line 4, in <module>
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\__init__.py", line 55, in <module>
    from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\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\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\cursor.py", line 18, in <module>
    from streamlit.runtime.scriptrunner import get_script_run_ctx
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\runtime\__init__.py", line 16, in <module>
    from streamlit.runtime.runtime import Runtime as Runtime
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\runtime\runtime.py", line 26, in <module>
    from streamlit.proto.BackMsg_pb2 import BackMsg
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\proto\BackMsg_pb2.py", line 5, in <module>
    from google.protobuf.internal import builder as _builder
ImportError: cannot import name 'builder' from 'google.protobuf.internal' (C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\google\protobuf\internal\__init__.py)

Pls help me out… :slightly_smiling_face:

Make sure you have a compatible version of protobuf. For Streamlit 1.16.0 that is protobuf<4,>=3.12.

2 Likes

@Goyo
Thanks goyo i upgraded the protobuf version.

and builder.py was missing in python package it was the solution.