Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BigQuery: ImportError due to missing client_pb2 #8674

Copy link
Copy link

Description

@shiroyuki
Issue body actions

Environment details

OS Affected Python Versions Virtual Environment Used?
MacOS 10.14.5 Python 3.7.0 and 3.7.4 No
→ pip3 list | grep google
google-api-core               1.13.0   
google-auth                   1.5.1    
google-cloud-bigquery         1.17.0   
google-cloud-core             1.0.2    
google-cloud-storage          1.13.0   
google-resumable-media        0.3.1    
googleapis-common-protos      1.5.5

Steps to reproduce

  1. Just try to import bigquery. ImportError is raised at this step.

(Updated: at July 15 11:34 AM EDT)
Please note that:

  • Without using a virtual environment, importing the module is perfectly fine on Debian.
  • Importing the module on MacOS with the virtual environment is ok while doing the same thing on MacOS without the virtual environment raises ImportError.

Code example

from google.cloud import bigquery

Stack trace

Traceback (most recent call last):
  File "zero/mp-118.py", line 1, in <module>
    from google.cloud import bigquery
  File "/usr/local/lib/python3.7/site-packages/google/cloud/bigquery/__init__.py", line 35, in <module>
    from google.cloud.bigquery.client import Client
  File "/usr/local/lib/python3.7/site-packages/google/cloud/bigquery/client.py", line 53, in <module>
    from google.cloud.bigquery.dataset import Dataset
  File "/usr/local/lib/python3.7/site-packages/google/cloud/bigquery/dataset.py", line 24, in <module>
    from google.cloud.bigquery.model import ModelReference
  File "/usr/local/lib/python3.7/site-packages/google/cloud/bigquery/model.py", line 27, in <module>
    from google.cloud.bigquery_v2 import types
  File "/usr/local/lib/python3.7/site-packages/google/cloud/bigquery_v2/__init__.py", line 23, in <module>
    from google.cloud.bigquery_v2 import types
  File "/usr/local/lib/python3.7/site-packages/google/cloud/bigquery_v2/types.py", line 23, in <module>
    from google.cloud.bigquery_v2.proto import model_pb2
  File "/usr/local/lib/python3.7/site-packages/google/cloud/bigquery_v2/proto/model_pb2.py", line 28, in <module>
    from google.api import client_pb2 as google_dot_api_dot_client__pb2
ImportError: cannot import name 'client_pb2' from 'google.api' (/usr/local/lib/python3.7/site-packages/google/api/__init__.py)
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.packagingtype: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.