Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Version of protobuf Produces an Error on Init #125

Closed
konfortes opened this issue May 26, 2022 · 6 comments
Closed

New Version of protobuf Produces an Error on Init #125

konfortes opened this issue May 26, 2022 · 6 comments

Comments

@konfortes
Copy link

konfortes commented May 26, 2022

Hey guys,
I'm getting this runtime error when trying to initialize the client:

  File "/home/jenkins/workspace/common-theme_common-main_PR-3310/common/.nox/test/lib/python3.8/site-packages/signalfx/__init__.py", line 103, in ingest
    from . import ingest
  File "/home/jenkins/workspace/common-theme_common-main_PR-3310/common/.nox/test/lib/python3.8/site-packages/signalfx/ingest.py", line 21, in <module>
    from .generated_protocol_buffers \
  File "/home/jenkins/workspace/common-theme_common-main_PR-3310/common/.nox/test/lib/python3.8/site-packages/signalfx/generated_protocol_buffers/signal_fx_protocol_buffers_pb2.py", line 32, in <module>
    _descriptor.EnumValueDescriptor(
  File "/home/jenkins/workspace/common-theme_common-main_PR-3310/common/.nox/test/lib/python3.8/site-packages/google/protobuf/descriptor.py", line 755, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: 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:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

It seems like a new stable version or protobuf (4.21.0) was release ~11h ago and the protobuf requirement is defined with >=3.0.0 so I guess this error has to do with that new protobuf version.

Will appreciate any kind of help. Thanks

@jdyke
Copy link
Contributor

jdyke commented May 26, 2022

Looks like the newest protobuf broke a lot of things. We see this error as well using signalfx

protocolbuffers/protobuf#10051

@meghaddn
Copy link

Could someone please create a new release with the merged fix. Thank you!

@jeffreyc-splunk
Copy link
Contributor

1.1.15 released to pypi

@threewordphrase
Copy link
Contributor

threewordphrase commented Oct 18, 2022

The fix merged in #126 , pinning to ==3.20.1, is conflicting with google-api-core's pin on !=3.20.1.

The original problem here looks like it was caused by a specific new problem with a specific new protobuf version. Why was it pinned exactly? Why couldn't the fix for signalfx be an additional <4.21.0 pin?

This is causing problems for our pip-compile workflows and unnecessary pinning by pip packages goes against python best practices.

@threewordphrase
Copy link
Contributor

Opened #132

@atoulme
Copy link
Contributor

atoulme commented Nov 2, 2022

Closing as #132 is now fixed, and a new release is in the process of being cut.

@atoulme atoulme closed this as completed Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants