Closed riteshghorse closed 1 year ago
Can you share the versions of dependencies you're using or a repro? I'm unable to reproduce this locally with a fresh virtualenv and latest versions of protobuf and google-cloud-profiler
# in a new dir
python3 -m venv venv
source venv/bin/activate
pip install google-cloud-profiler protobuf==4.22.1
python -c 'from googlecloudprofiler import profile_pb2'
# no error
output of pip freeze
cachetools==5.3.0
certifi==2022.12.7
charset-normalizer==3.1.0
google-api-core==2.11.0
google-api-python-client==2.85.0
google-auth==2.17.2
google-auth-httplib2==0.1.0
google-cloud-profiler==4.0.0
googleapis-common-protos==1.59.0
httplib2==0.22.0
idna==3.4
protobuf==4.22.1
pyasn1==0.4.8
pyasn1-modules==0.2.8
pyparsing==3.0.9
requests==2.28.2
rsa==4.9
six==1.16.0
uritemplate==4.1.1
urllib3==1.26.15
Importing it locally in a interpreter worked fine for me. It looks like our dev containers aren't updated yet which may have caused this issue. Closing this one for now. Thanks for investigating Aaron!
With latest release of protobuf, the profile_pb2.py needs to be regenerated. We are facing an issue in Apache Beam Python SDK importing the googlecloudprofiler which throws the protobuf version exception![image](https://user-images.githubusercontent.com/25881114/231486475-2cdc2af1-7dff-4266-95ed-2b706ad1353c.png)