You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 17, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 17, 2025. It is now read-only.
opencensus-ext-azure doesn't support protobuf > 3.20 #1171
Steps to reproduce.
Create an environment with the packages defined above and try the following import from opencensus.ext.azure.trace_exporter import AzureExporter
What is the expected behavior?
AzureExporter is imported successfully
What is the actual behavior?
It crashes with the following error
Exception has occurred: TypeError (note: full exception trace is shown but execution is paused at: _run_module_as_main)
Descriptors cannot not be created directly.
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.
If you cannot immediately regenerate your protos, some other possible workarounds are:
Downgrade the protobuf package to 3.20.x or lower.
Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
This does not seem an issue with the opencensus-ext-azure package specifically. The opencensus package has a dependency on google-api-core, which in turn takes a dependency on a version of protobuf. I've tested the versions of protobuf and it looks like protobuf v4.x will break opencensus. We should probably pin protobuf in opencensus instead. @aabmass thoughts?
Activity
Pin protobuf to <= 3.20
lzchen commentedon Jan 9, 2023
This does not seem an issue with the
opencensus-ext-azurepackage specifically. Theopencensuspackage has a dependency on google-api-core, which in turn takes a dependency on a version of protobuf. I've tested the versions ofprotobufand it looks likeprotobuf v4.xwill break opencensus. We should probably pin protobuf inopencensusinstead. @aabmass thoughts?