nice-tiger-10140
08/14/2023, 2:48 PMpants test ::
, i have a test that uses streamlit.
While importing streamlit, im getting the following error:
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"
happy-kitchen-89482
08/14/2023, 2:55 PMhappy-kitchen-89482
08/14/2023, 2:55 PMnice-tiger-10140
08/14/2023, 3:03 PMnice-tiger-10140
08/14/2023, 3:03 PMhappy-kitchen-89482
08/14/2023, 3:17 PMgorgeous-winter-99296
08/14/2023, 5:28 PM