Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Closed
@BinarSkugga

Description

@BinarSkugga

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'

Metadata

Metadata

Assignees

Labels

priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions