GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Needs protobuf minimum version 3.12.0 · Issue #305 · googleapis/python-bigquery

This repository was archived by the owner on Mar 6, 2026. It is now read-only.
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Needs protobuf minimum version 3.12.0 #305

Copy link
Copy link
Closed
#306
Closed
Needs protobuf minimum version 3.12.0#305
#306
Copy link
Assignees
yoshi-automation
Labels
api: bigqueryIssues related to the googleapis/python-bigquery API.type: questionRequest for information or clarification. Not an issue.

Description

@anistark
anistark
opened on Oct 7, 2020
Issue body actions

If you are still having issues, please be sure to include as much information as possible:

Environment details

  • OS type and version: MacOS
  • Python version: python --version 3.8
  • pip version: pip --version 20.2.3
  • google-cloud-bigquery version: pip show google-cloud-bigquery 2.0.0

Steps to reproduce

  1. Just install the package, import somewhere and run it.

Code example

from google.cloud import bigquery

Stack trace

File "/.../venv/lib/python3.8/site-packages/google/protobuf/internal/python_message.py", line 570, in _GetFieldByName
    return message_descriptor.fields_by_name[field_name]
KeyError: 'proto3_optional'

...

   from google.cloud import bigquery
  File "/.../venv/lib/python3.8/site-packages/google/cloud/bigquery/__init__.py", line 35, in <module>
    from google.cloud.bigquery.client import Client
  File "/.../venv/lib/python3.8/site-packages/google/cloud/bigquery/client.py", line 57, in <module>
    from google.cloud.bigquery import _pandas_helpers
  File "/.../venv/lib/python3.8/site-packages/google/cloud/bigquery/_pandas_helpers.py", line 36, in <module>
    from google.cloud.bigquery import schema
  File "/.../venv/lib/python3.8/site-packages/google/cloud/bigquery/schema.py", line 19, in <module>
    from google.cloud.bigquery_v2 import types
  File "/.../venv/lib/python3.8/site-packages/google/cloud/bigquery_v2/__init__.py", line 19, in <module>
    from .types.encryption_config import EncryptionConfiguration
  File "/.../venv/lib/python3.8/site-packages/google/cloud/bigquery_v2/types/__init__.py", line 18, in <module>
    from .encryption_config import EncryptionConfiguration
  File "/.../venv/lib/python3.8/site-packages/google/cloud/bigquery_v2/types/encryption_config.py", line 29, in <module>
    class EncryptionConfiguration(proto.Message):
  File "/.../venv/lib/python3.8/site-packages/proto/message.py", line 215, in __new__
    field=[i.descriptor for i in fields],
  File "/.../venv/lib/python3.8/site-packages/proto/message.py", line 215, in <listcomp>
    field=[i.descriptor for i in fields],
  File "/.../venv/lib/python3.8/site-packages/proto/fields.py", line 104, in descriptor
    self._descriptor = descriptor_pb2.FieldDescriptorProto(
  File "/.../venv/lib/python3.8/site-packages/google/protobuf/internal/python_message.py", line 509, in init
    field = _GetFieldByName(message_descriptor, field_name)
  File "/.../venv/lib/python3.8/site-packages/google/protobuf/internal/python_message.py", line 572, in _GetFieldByName
    raise ValueError('Protocol message %s has no "%s" field.' %
ValueError: Protocol message FieldDescriptorProto has no "proto3_optional" field.

Activity

  1. product-auto-label
    added
    api: bigqueryIssues related to the googleapis/python-bigquery API.
    on Oct 7, 2020
  2. HemangChothani commented on Oct 7, 2020

    @HemangChothani
    HemangChothani
    on Oct 7, 2020
    Contributor
    More actions

    @anistark google-cloud-bigquery has dependency of proto-plus as you can see below which use the protobuf.

    python-bigquery/setup.py

    Line 33 in d1eb8b3

    "proto-plus >= 1.10.0",

    proto-plus library has already mentioned a minimum version of protobuf, you can find here https://github.com/googleapis/proto-plus-python/blob/d045cbf058cbb8f4ca98dd06741270fcaee865be/setup.py#L39

  3. anistark commented on Oct 7, 2020

    @anistark
    anistark
    on Oct 7, 2020
    ContributorAuthor
    More actions

    And yet it somehow didn't install for me.

  4. HemangChothani commented on Oct 7, 2020

    @HemangChothani
    HemangChothani
    on Oct 7, 2020
    Contributor
    More actions

    @anistark i have tried to install with fresh env and it's working fine, even i tried to install proto-plus and 'google-cloud-bigquery' with already installed older version of protobuf, it successfully uninstall the older version and install the latest version of library.

  5. HemangChothani
    added
    type: questionRequest for information or clarification. Not an issue.
    on Oct 7, 2020
  6. gcf-merge-on-green
    closed this as completedin #306on Oct 16, 2020
  7. gcf-merge-on-green
    added 2 commits that reference this issue on Oct 16, 2020

    deps: add protobuf dependency (#306)

    This issue will close once commit cebb5e0 is merged into the 'main' branch.
    cebb5e0

    chore: release 2.2.0 (#321)

    This issue will close once commit 82290c3 is merged into the 'main' branch.
    82290c3
  8. aylusltd commented on Dec 17, 2020

    @aylusltd
    aylusltd
    on Dec 17, 2020
    More actions

    Clean install on AWS Sagemaker CondaPython3 Kernel. Looks like same bug.

    Collecting google-cloud-bigquery
      Downloading google_cloud_bigquery-2.6.1-py2.py3-none-any.whl (211 kB)
         |████████████████████████████████| 211 kB 15.9 MB/s eta 0:00:01
    Requirement already satisfied: six<2.0.0dev,>=1.13.0 in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from google-cloud-bigquery) (1.14.0)
    Collecting proto-plus>=1.10.0
      Downloading proto-plus-1.13.0.tar.gz (44 kB)
         |████████████████████████████████| 44 kB 3.5 MB/s  eta 0:00:01
    Collecting google-resumable-media<2.0dev,>=0.6.0
      Downloading google_resumable_media-1.2.0-py2.py3-none-any.whl (75 kB)
         |████████████████████████████████| 75 kB 6.2 MB/s  eta 0:00:01
    Requirement already satisfied: protobuf>=3.12.0 in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from google-cloud-bigquery) (3.12.2)
    Collecting google-cloud-core<2.0dev,>=1.4.1
      Downloading google_cloud_core-1.5.0-py2.py3-none-any.whl (27 kB)
    Collecting google-api-core[grpc]<2.0.0dev,>=1.23.0
      Downloading google_api_core-1.24.1-py2.py3-none-any.whl (92 kB)
         |████████████████████████████████| 92 kB 14.7 MB/s eta 0:00:01
    Collecting google-crc32c<2.0dev,>=1.0; python_version >= "3.5"
      Downloading google_crc32c-1.1.0-cp36-cp36m-manylinux2010_x86_64.whl (39 kB)
    Requirement already satisfied: setuptools in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from protobuf>=3.12.0->google-cloud-bigquery) (46.1.3.post20200330)
    Collecting googleapis-common-protos<2.0dev,>=1.6.0
      Downloading googleapis_common_protos-1.52.0-py2.py3-none-any.whl (100 kB)
         |████████████████████████████████| 100 kB 13.2 MB/s ta 0:00:01
    Requirement already satisfied: requests<3.0.0dev,>=2.18.0 in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.23.0->google-cloud-bigquery) (2.23.0)
    Requirement already satisfied: pytz in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.23.0->google-cloud-bigquery) (2019.3)
    Collecting google-auth<2.0dev,>=1.21.1
      Downloading google_auth-1.24.0-py2.py3-none-any.whl (114 kB)
         |████████████████████████████████| 114 kB 68.9 MB/s eta 0:00:01
    Collecting grpcio<2.0dev,>=1.29.0; extra == "grpc"
      Downloading grpcio-1.34.0-cp36-cp36m-manylinux2014_x86_64.whl (4.0 MB)
         |████████████████████████████████| 4.0 MB 62.5 MB/s eta 0:00:01
    Requirement already satisfied: cffi>=1.0.0 in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from google-crc32c<2.0dev,>=1.0; python_version >= "3.5"->google-resumable-media<2.0dev,>=0.6.0->google-cloud-bigquery) (1.14.0)
    Requirement already satisfied: idna<3,>=2.5 in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.23.0->google-cloud-bigquery) (2.9)
    Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.23.0->google-cloud-bigquery) (1.25.8)
    Requirement already satisfied: certifi>=2017.4.17 in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.23.0->google-cloud-bigquery) (2020.4.5.1)
    Requirement already satisfied: chardet<4,>=3.0.2 in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.23.0->google-cloud-bigquery) (3.0.4)
    Collecting pyasn1-modules>=0.2.1
      Downloading pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
         |████████████████████████████████| 155 kB 64.1 MB/s eta 0:00:01
    Collecting cachetools<5.0,>=2.0.0
      Downloading cachetools-4.2.0-py3-none-any.whl (12 kB)
    Requirement already satisfied: rsa<5,>=3.1.4; python_version >= "3.6" in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from google-auth<2.0dev,>=1.21.1->google-api-core[grpc]<2.0.0dev,>=1.23.0->google-cloud-bigquery) (3.4.2)
    Requirement already satisfied: pycparser in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from cffi>=1.0.0->google-crc32c<2.0dev,>=1.0; python_version >= "3.5"->google-resumable-media<2.0dev,>=0.6.0->google-cloud-bigquery) (2.20)
    Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from pyasn1-modules>=0.2.1->google-auth<2.0dev,>=1.21.1->google-api-core[grpc]<2.0.0dev,>=1.23.0->google-cloud-bigquery) (0.4.8)
    Building wheels for collected packages: proto-plus
      Building wheel for proto-plus (setup.py) ... done
      Created wheel for proto-plus: filename=proto_plus-1.13.0-py3-none-any.whl size=41591 sha256=185a880a276da72cb83ea7d6a1abf2b33be68ff357c6fe11e2b324d313f683ba
      Stored in directory: /home/ec2-user/.cache/pip/wheels/5a/76/e1/dd2dc8192e9a6b687d8c7550acc7c8edf059a4f16296e7ea89
    Successfully built proto-plus
    Installing collected packages: proto-plus, google-crc32c, google-resumable-media, googleapis-common-protos, pyasn1-modules, cachetools, google-auth, grpcio, google-api-core, google-cloud-core, google-cloud-bigquery
    Successfully installed cachetools-4.2.0 google-api-core-1.24.1 google-auth-1.24.0 google-cloud-bigquery-2.6.1 google-cloud-core-1.5.0 google-crc32c-1.1.0 google-resumable-media-1.2.0 googleapis-common-protos-1.52.0 grpcio-1.34.0 proto-plus-1.13.0 pyasn1-modules-0.2.8
    WARNING: You are using pip version 20.0.2; however, version 20.3.3 is available.
    You should consider upgrading via the '/home/ec2-user/anaconda3/envs/python3/bin/python -m pip install --upgrade pip' command.
    
    ValueError                                Traceback (most recent call last)
    <ipython-input-4-b3914349486e> in <module>
    ----> 1 from google.cloud import bigquery
          2 query_string = """
          3 SELECT * FROM `<---REDACTED DB NAME--->` LIMIT 10
          4 """
          5 client = bigquery.Client()
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery/__init__.py in <module>
         33 __version__ = bigquery_version.__version__
         34 
    ---> 35 from google.cloud.bigquery.client import Client
         36 from google.cloud.bigquery.dataset import AccessEntry
         37 from google.cloud.bigquery.dataset import Dataset
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery/client.py in <module>
         55 from google.cloud.bigquery._helpers import _verify_job_config_type
         56 from google.cloud.bigquery._http import Connection
    ---> 57 from google.cloud.bigquery import _pandas_helpers
         58 from google.cloud.bigquery.dataset import Dataset
         59 from google.cloud.bigquery.dataset import DatasetListItem
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery/_pandas_helpers.py in <module>
         34     pyarrow = None
         35 
    ---> 36 from google.cloud.bigquery import schema
         37 
         38 
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery/schema.py in <module>
         17 from six.moves import collections_abc
         18 
    ---> 19 from google.cloud.bigquery_v2 import types
         20 
         21 
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery_v2/__init__.py in <module>
         17 
         18 
    ---> 19 from .types.encryption_config import EncryptionConfiguration
         20 from .types.model import DeleteModelRequest
         21 from .types.model import GetModelRequest
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery_v2/types/__init__.py in <module>
         16 #
         17 
    ---> 18 from .encryption_config import EncryptionConfiguration
         19 from .model_reference import ModelReference
         20 from .standard_sql import (
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery_v2/types/encryption_config.py in <module>
         27 
         28 
    ---> 29 class EncryptionConfiguration(proto.Message):
         30     r"""
         31 
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/proto/message.py in __new__(mcls, name, bases, attrs)
        212         desc = descriptor_pb2.DescriptorProto(
        213             name=name,
    --> 214             field=[i.descriptor for i in fields],
        215             oneof_decl=[
        216                 descriptor_pb2.OneofDescriptorProto(name=i) for i in oneofs.keys()
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/proto/message.py in <listcomp>(.0)
        212         desc = descriptor_pb2.DescriptorProto(
        213             name=name,
    --> 214             field=[i.descriptor for i in fields],
        215             oneof_decl=[
        216                 descriptor_pb2.OneofDescriptorProto(name=i) for i in oneofs.keys()
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/proto/fields.py in descriptor(self)
        109                 type_name=type_name,
        110                 json_name=self.json_name,
    --> 111                 proto3_optional=self.optional,
        112             )
        113 
    
    ValueError: Protocol message FieldDescriptorProto has no "proto3_optional" field.
    
    Reacted by anzen-l
  9. anzen-l commented on Dec 28, 2020

    @anzen-l
    anzen-l
    on Dec 28, 2020
    More actions

    Clean install on AWS Sagemaker CondaPython3 Kernel. Looks like same bug.

    Collecting google-cloud-bigquery
      Downloading google_cloud_bigquery-2.6.1-py2.py3-none-any.whl (211 kB)
         |████████████████████████████████| 211 kB 15.9 MB/s eta 0:00:01
    Requirement already satisfied: six<2.0.0dev,>=1.13.0 in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from google-cloud-bigquery) (1.14.0)
    Collecting proto-plus>=1.10.0
      Downloading proto-plus-1.13.0.tar.gz (44 kB)
         |████████████████████████████████| 44 kB 3.5 MB/s  eta 0:00:01
    Collecting google-resumable-media<2.0dev,>=0.6.0
      Downloading google_resumable_media-1.2.0-py2.py3-none-any.whl (75 kB)
         |████████████████████████████████| 75 kB 6.2 MB/s  eta 0:00:01
    Requirement already satisfied: protobuf>=3.12.0 in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from google-cloud-bigquery) (3.12.2)
    Collecting google-cloud-core<2.0dev,>=1.4.1
      Downloading google_cloud_core-1.5.0-py2.py3-none-any.whl (27 kB)
    Collecting google-api-core[grpc]<2.0.0dev,>=1.23.0
      Downloading google_api_core-1.24.1-py2.py3-none-any.whl (92 kB)
         |████████████████████████████████| 92 kB 14.7 MB/s eta 0:00:01
    Collecting google-crc32c<2.0dev,>=1.0; python_version >= "3.5"
      Downloading google_crc32c-1.1.0-cp36-cp36m-manylinux2010_x86_64.whl (39 kB)
    Requirement already satisfied: setuptools in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from protobuf>=3.12.0->google-cloud-bigquery) (46.1.3.post20200330)
    Collecting googleapis-common-protos<2.0dev,>=1.6.0
      Downloading googleapis_common_protos-1.52.0-py2.py3-none-any.whl (100 kB)
         |████████████████████████████████| 100 kB 13.2 MB/s ta 0:00:01
    Requirement already satisfied: requests<3.0.0dev,>=2.18.0 in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.23.0->google-cloud-bigquery) (2.23.0)
    Requirement already satisfied: pytz in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from google-api-core[grpc]<2.0.0dev,>=1.23.0->google-cloud-bigquery) (2019.3)
    Collecting google-auth<2.0dev,>=1.21.1
      Downloading google_auth-1.24.0-py2.py3-none-any.whl (114 kB)
         |████████████████████████████████| 114 kB 68.9 MB/s eta 0:00:01
    Collecting grpcio<2.0dev,>=1.29.0; extra == "grpc"
      Downloading grpcio-1.34.0-cp36-cp36m-manylinux2014_x86_64.whl (4.0 MB)
         |████████████████████████████████| 4.0 MB 62.5 MB/s eta 0:00:01
    Requirement already satisfied: cffi>=1.0.0 in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from google-crc32c<2.0dev,>=1.0; python_version >= "3.5"->google-resumable-media<2.0dev,>=0.6.0->google-cloud-bigquery) (1.14.0)
    Requirement already satisfied: idna<3,>=2.5 in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.23.0->google-cloud-bigquery) (2.9)
    Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.23.0->google-cloud-bigquery) (1.25.8)
    Requirement already satisfied: certifi>=2017.4.17 in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.23.0->google-cloud-bigquery) (2020.4.5.1)
    Requirement already satisfied: chardet<4,>=3.0.2 in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.23.0->google-cloud-bigquery) (3.0.4)
    Collecting pyasn1-modules>=0.2.1
      Downloading pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
         |████████████████████████████████| 155 kB 64.1 MB/s eta 0:00:01
    Collecting cachetools<5.0,>=2.0.0
      Downloading cachetools-4.2.0-py3-none-any.whl (12 kB)
    Requirement already satisfied: rsa<5,>=3.1.4; python_version >= "3.6" in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from google-auth<2.0dev,>=1.21.1->google-api-core[grpc]<2.0.0dev,>=1.23.0->google-cloud-bigquery) (3.4.2)
    Requirement already satisfied: pycparser in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from cffi>=1.0.0->google-crc32c<2.0dev,>=1.0; python_version >= "3.5"->google-resumable-media<2.0dev,>=0.6.0->google-cloud-bigquery) (2.20)
    Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages (from pyasn1-modules>=0.2.1->google-auth<2.0dev,>=1.21.1->google-api-core[grpc]<2.0.0dev,>=1.23.0->google-cloud-bigquery) (0.4.8)
    Building wheels for collected packages: proto-plus
      Building wheel for proto-plus (setup.py) ... done
      Created wheel for proto-plus: filename=proto_plus-1.13.0-py3-none-any.whl size=41591 sha256=185a880a276da72cb83ea7d6a1abf2b33be68ff357c6fe11e2b324d313f683ba
      Stored in directory: /home/ec2-user/.cache/pip/wheels/5a/76/e1/dd2dc8192e9a6b687d8c7550acc7c8edf059a4f16296e7ea89
    Successfully built proto-plus
    Installing collected packages: proto-plus, google-crc32c, google-resumable-media, googleapis-common-protos, pyasn1-modules, cachetools, google-auth, grpcio, google-api-core, google-cloud-core, google-cloud-bigquery
    Successfully installed cachetools-4.2.0 google-api-core-1.24.1 google-auth-1.24.0 google-cloud-bigquery-2.6.1 google-cloud-core-1.5.0 google-crc32c-1.1.0 google-resumable-media-1.2.0 googleapis-common-protos-1.52.0 grpcio-1.34.0 proto-plus-1.13.0 pyasn1-modules-0.2.8
    WARNING: You are using pip version 20.0.2; however, version 20.3.3 is available.
    You should consider upgrading via the '/home/ec2-user/anaconda3/envs/python3/bin/python -m pip install --upgrade pip' command.
    
    ValueError                                Traceback (most recent call last)
    <ipython-input-4-b3914349486e> in <module>
    ----> 1 from google.cloud import bigquery
          2 query_string = """
          3 SELECT * FROM `<---REDACTED DB NAME--->` LIMIT 10
          4 """
          5 client = bigquery.Client()
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery/__init__.py in <module>
         33 __version__ = bigquery_version.__version__
         34 
    ---> 35 from google.cloud.bigquery.client import Client
         36 from google.cloud.bigquery.dataset import AccessEntry
         37 from google.cloud.bigquery.dataset import Dataset
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery/client.py in <module>
         55 from google.cloud.bigquery._helpers import _verify_job_config_type
         56 from google.cloud.bigquery._http import Connection
    ---> 57 from google.cloud.bigquery import _pandas_helpers
         58 from google.cloud.bigquery.dataset import Dataset
         59 from google.cloud.bigquery.dataset import DatasetListItem
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery/_pandas_helpers.py in <module>
         34     pyarrow = None
         35 
    ---> 36 from google.cloud.bigquery import schema
         37 
         38 
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery/schema.py in <module>
         17 from six.moves import collections_abc
         18 
    ---> 19 from google.cloud.bigquery_v2 import types
         20 
         21 
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery_v2/__init__.py in <module>
         17 
         18 
    ---> 19 from .types.encryption_config import EncryptionConfiguration
         20 from .types.model import DeleteModelRequest
         21 from .types.model import GetModelRequest
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery_v2/types/__init__.py in <module>
         16 #
         17 
    ---> 18 from .encryption_config import EncryptionConfiguration
         19 from .model_reference import ModelReference
         20 from .standard_sql import (
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery_v2/types/encryption_config.py in <module>
         27 
         28 
    ---> 29 class EncryptionConfiguration(proto.Message):
         30     r"""
         31 
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/proto/message.py in __new__(mcls, name, bases, attrs)
        212         desc = descriptor_pb2.DescriptorProto(
        213             name=name,
    --> 214             field=[i.descriptor for i in fields],
        215             oneof_decl=[
        216                 descriptor_pb2.OneofDescriptorProto(name=i) for i in oneofs.keys()
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/proto/message.py in <listcomp>(.0)
        212         desc = descriptor_pb2.DescriptorProto(
        213             name=name,
    --> 214             field=[i.descriptor for i in fields],
        215             oneof_decl=[
        216                 descriptor_pb2.OneofDescriptorProto(name=i) for i in oneofs.keys()
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/proto/fields.py in descriptor(self)
        109                 type_name=type_name,
        110                 json_name=self.json_name,
    --> 111                 proto3_optional=self.optional,
        112             )
        113 
    
    ValueError: Protocol message FieldDescriptorProto has no "proto3_optional" field.
    

    I have the same problem with big query & jupyter notebooks

  10. JustinBeckwith
    assigned
    yoshi-automation
    on Feb 2, 2021
  11. Tsakunelson commented on Mar 17, 2021

    @Tsakunelson
    Tsakunelson
    on Mar 17, 2021
    More actions

    Hi All,
    I am still having this same error, though have all the dependencies installed on a Jupyter Notebook in AWS Sagemaker including:

    Protobuf = 3.13.0```
    
    For Google BigQuery 2.12.0
    
    But I get the following error:
    
    ```---------------------------------------------------------------------------
    ValueError                                Traceback (most recent call last)
    <ipython-input-3-017a44a94d83> in <module>
    ----> 1 df = gbq.read_gbq('SELECT * FROM `cmg-consumer-analytics.122142903.ga_sessions_20210314` LIMIT 10', project_id='cmg-consumer-analytics')
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/pandas/io/gbq.py in read_gbq(query, project_id, index_col, col_order, reauth, auth_local_webserver, dialect, location, configuration, credentials, use_bqstorage_api, private_key, verbose, progress_bar_type)
        161     DataFrame.to_gbq : Write a DataFrame to Google BigQuery.
        162     """
    --> 163     pandas_gbq = _try_import()
        164 
        165     kwargs: Dict[str, Union[str, bool]] = {}
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/pandas/io/gbq.py in _try_import()
         15         "See the docs: https://pandas-gbq.readthedocs.io."
         16     )
    ---> 17     pandas_gbq = import_optional_dependency("pandas_gbq", extra=msg)
         18     return pandas_gbq
         19 
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/pandas/compat/_optional.py in import_optional_dependency(name, extra, raise_on_missing, on_version)
         87     )
         88     try:
    ---> 89         module = importlib.import_module(name)
         90     except ImportError:
         91         if raise_on_missing:
    
    ~/anaconda3/envs/python3/lib/python3.6/importlib/__init__.py in import_module(name, package)
        124                 break
        125             level += 1
    --> 126     return _bootstrap._gcd_import(name[level:], package, level)
        127 
        128 
    
    ~/anaconda3/envs/python3/lib/python3.6/importlib/_bootstrap.py in _gcd_import(name, package, level)
    
    ~/anaconda3/envs/python3/lib/python3.6/importlib/_bootstrap.py in _find_and_load(name, import_)
    
    ~/anaconda3/envs/python3/lib/python3.6/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)
    
    ~/anaconda3/envs/python3/lib/python3.6/importlib/_bootstrap.py in _load_unlocked(spec)
    
    ~/anaconda3/envs/python3/lib/python3.6/importlib/_bootstrap_external.py in exec_module(self, module)
    
    ~/anaconda3/envs/python3/lib/python3.6/importlib/_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/pandas_gbq/__init__.py in <module>
    ----> 1 from .gbq import to_gbq, read_gbq, Context, context  # noqa
          2 
          3 from ._version import get_versions
          4 
          5 versions = get_versions()
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/pandas_gbq/gbq.py in <module>
         10 try:
         11     from google.api_core import exceptions as google_exceptions
    ---> 12     from google.cloud import bigquery
         13 except ImportError:  # pragma: NO COVER
         14     bigquery = None
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery/__init__.py in <module>
         33 __version__ = bigquery_version.__version__
         34 
    ---> 35 from google.cloud.bigquery.client import Client
         36 from google.cloud.bigquery.dataset import AccessEntry
         37 from google.cloud.bigquery.dataset import Dataset
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery/client.py in <module>
         54 from google.cloud.bigquery._helpers import _verify_job_config_type
         55 from google.cloud.bigquery._http import Connection
    ---> 56 from google.cloud.bigquery import _pandas_helpers
         57 from google.cloud.bigquery.dataset import Dataset
         58 from google.cloud.bigquery.dataset import DatasetListItem
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery/_pandas_helpers.py in <module>
         34     pyarrow = None
         35 
    ---> 36 from google.cloud.bigquery import schema
         37 
         38 
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery/schema.py in <module>
         17 import collections
         18 
    ---> 19 from google.cloud.bigquery_v2 import types
         20 
         21 
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery_v2/__init__.py in <module>
         17 
         18 
    ---> 19 from .types.encryption_config import EncryptionConfiguration
         20 from .types.model import DeleteModelRequest
         21 from .types.model import GetModelRequest
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery_v2/types/__init__.py in <module>
         16 #
         17 
    ---> 18 from .encryption_config import EncryptionConfiguration
         19 from .model import (
         20     DeleteModelRequest,
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/google/cloud/bigquery_v2/types/encryption_config.py in <module>
         27 
         28 
    ---> 29 class EncryptionConfiguration(proto.Message):
         30     r"""
         31 
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/proto/message.py in __new__(mcls, name, bases, attrs)
        212         desc = descriptor_pb2.DescriptorProto(
        213             name=name,
    --> 214             field=[i.descriptor for i in fields],
        215             oneof_decl=[
        216                 descriptor_pb2.OneofDescriptorProto(name=i) for i in oneofs.keys()
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/proto/message.py in <listcomp>(.0)
        212         desc = descriptor_pb2.DescriptorProto(
        213             name=name,
    --> 214             field=[i.descriptor for i in fields],
        215             oneof_decl=[
        216                 descriptor_pb2.OneofDescriptorProto(name=i) for i in oneofs.keys()
    
    ~/anaconda3/envs/python3/lib/python3.6/site-packages/proto/fields.py in descriptor(self)
        109                 type_name=type_name,
        110                 json_name=self.json_name,
    --> 111                 proto3_optional=self.optional,
        112             )
        113 
    
    ValueError: Protocol message FieldDescriptorProto has no "proto3_optional" field.```
    
    
    
    Why does the error still prevail? am I missing something else? Feedback appreciated.
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @yoshi-automation
    yoshi-automation

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.