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

Updating the pubsub client breaks because it needs a newer version of protobuf #48

Closed
BinarSkugga opened this issue Jun 12, 2020 · 5 comments · Fixed by #49
Closed

Updating the pubsub client breaks because it needs a newer version of protobuf #48

BinarSkugga opened this issue Jun 12, 2020 · 5 comments · Fixed by #49
Assignees
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@BinarSkugga
Copy link

BinarSkugga commented Jun 12, 2020

Environment details

  • OS type and version: Windows 10
  • Python version: 3.6.9
  • pip version: 20.0.2
  • google-api-core version: 1.16.0

Steps to reproduce

  1. Install google-cloud-pubsub==1.6.0 and protobuf==3.10.0
  2. Import the PushConfig object to create a push topic

Quick fix

Reinstalling protobuf fixes this issue, to my knowledge, 3.12 seems enough.

Stack trace

Traceback (most recent call last):
  File "C:\Users\Sollum\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\Sollum\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Sollum\PycharmProjects\sollumcloudplatform\src\main.py", line 19, in <module>
    from src.procedures import create_app
  File "C:\Users\Sollum\PycharmProjects\sollumcloudplatform\src\procedures.py", line 15, in <module>
    from src.utils.decorators import memoize
  File "C:\Users\Sollum\PycharmProjects\sollumcloudplatform\src\utils\decorators.py", line 14, in <module>
    from google.cloud.pubsub_v1.proto.pubsub_pb2 import PushConfig
  File "C:\Users\Sollum\PycharmProjects\sollumcloudplatform\venv\lib\site-packages\google\cloud\pubsub_v1\__init__.py", line 17, in <module>
    from google.cloud.pubsub_v1 import types
  File "C:\Users\Sollum\PycharmProjects\sollumcloudplatform\venv\lib\site-packages\google\cloud\pubsub_v1\types.py", line 32, in <module>
    from google.cloud.pubsub_v1.proto import pubsub_pb2
  File "C:\Users\Sollum\PycharmProjects\sollumcloudplatform\venv\lib\site-packages\google\cloud\pubsub_v1\proto\pubsub_pb2.py", line 30, in <module>
    create_key=_descriptor._internal_create_key,
AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key'
@BinarSkugga
Copy link
Author

I didn't fill this issue in the pubsub repository because the protobuf dependency lies here.

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jun 13, 2020
@BinarSkugga BinarSkugga changed the title Updating the pubsub breaks because it needs a newer version of protobuf Updating the pubsub client breaks because it needs a newer version of protobuf Jun 14, 2020
busunkim96 added a commit that referenced this issue Jun 15, 2020
Increase protobuf version to 3.12.0 for `_internal_create_key`. Closes #48
@busunkim96 busunkim96 added priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed triage me I really want to be triaged. labels Jun 15, 2020
@lkvr
Copy link

lkvr commented Jun 16, 2020

Same issue, but what I installed
google-cloud-pubsub==1.6.0
googleapis-common-protos==1.5.2

protobuf in sources has 3.8.0

atm googleapis-common-protos is the latest version, guess it also needs to be updated with latest protobuf.

busunkim96 added a commit that referenced this issue Jun 16, 2020
Increase protobuf version to 3.12.0 for `_internal_create_key`. Closes #48
@hauntsaninja
Copy link

@busunkim96 thanks for the fix! would it be possible to yank the 1.20.0 release?
i have a pinned version of protobuf and my dependency resolver thinks 1.20.0 is safe to upgrade to.

@busunkim96
Copy link
Contributor

@hauntsaninja Done! (I didn't realize "yanking" had been added to PyPI).

@hauntsaninja
Copy link

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants