<#19607 Protobuf failure when using Streamlit> Iss...
# github-notifications
c
#19607 Protobuf failure when using Streamlit Issue created by AronsonDan Describe the bug When trying to run
pants test ::
, i have a test that uses streamlit. While importing streamlit, im getting the following error:
Copy code
import streamlit as st
/Users/danaronson/.cache/pants/named_caches/pex_root/venvs/s/d77156b5/venv/lib/python3.9/site-packages/streamlit/__init__.py:48: in <module>
    from streamlit.proto.RootContainer_pb2 import RootContainer
/Users/danaronson/.cache/pants/named_caches/pex_root/venvs/s/d77156b5/venv/lib/python3.9/site-packages/streamlit/proto/RootContainer_pb2.py:33: in <module>
    _descriptor.EnumValueDescriptor(
/Users/danaronson/.cache/pants/named_caches/pex_root/venvs/s/d77156b5/venv/lib/python3.9/site-packages/google/protobuf/descriptor.py:796: in __new__
    _message.Message._CheckCalledFromGeneratedFile()
E   TypeError: Descriptors cannot not be created directly.
E   If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
E   If you cannot immediately regenerate your protos, some other possible workarounds are:
E    1. Downgrade the protobuf package to 3.20.x or lower.
E    2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
E   
E   More information: <https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates>
While using the same code and running the tests using Pytest it is running as expected. Pants version pants_version = "2.16.0" OS MacOs ventura version: 13.2.1 Additional info Poetry versions: python = "3.9.*" streamlit = "1.8.0" streamlit-aggrid = "0.2.3" protobuf = ">=4.21.1,<=4.21.12" pantsbuild/pants