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

Skip to content

protobuf-4.25.3 is incompatible with the library and results in an import error #1830

@kanakmi

Description

@kanakmi

Environment details

  • OS type and version: Debian 11
  • Python version: 3.10.8
  • pip version: 23.3.1
  • google-cloud-bigquery version: 3.17.2

Steps to reproduce

  1. Intall protobuf-4.25.3
  2. Import bigquery

Code example

from google.cloud import bigquery

Stack trace

line 14, in <module>
    from google.cloud import bigquery
  File "/opt/conda/default/lib/python3.10/site-packages/google/cloud/bigquery/__init__.py", line 35, in <module>
    from google.cloud.bigquery.client import Client
  File "/opt/conda/default/lib/python3.10/site-packages/google/cloud/bigquery/client.py", line 52, in <module>
    import google.api_core.exceptions as core_exceptions
  File "/opt/conda/default/lib/python3.10/site-packages/google/api_core/exceptions.py", line 29, in <module>
    from google.rpc import error_details_pb2
  File "/opt/conda/default/lib/python3.10/site-packages/google/rpc/error_details_pb2.py", line 20, in <module>
    from google.protobuf import descriptor as _descriptor
ImportError: cannot import name 'descriptor' from 'google.protobuf' (unknown location)

Recommendation

We tried re-installing bigquery but that didn't fix the error. Please mark protobuf-4.25.3 as incompatible in the dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: bigqueryIssues related to the googleapis/python-bigquery API.priority: p3Desirable enhancement or fix. May not be included in next release.type: questionRequest for information or clarification. Not an issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions