You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 6, 2026. It is now read-only.
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
Just install the package, import somewhere and run it.
Code example
fromgoogle.cloudimportbigquery
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.
@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.
Activity
HemangChothani commentedon Oct 7, 2020
@anistark
google-cloud-bigqueryhas dependency ofproto-plusas you can see below which use the protobuf.python-bigquery/setup.py
Line 33 in d1eb8b3
proto-pluslibrary has already mentioned a minimum version ofprotobuf, you can find here https://github.com/googleapis/proto-plus-python/blob/d045cbf058cbb8f4ca98dd06741270fcaee865be/setup.py#L39anistark commentedon Oct 7, 2020
And yet it somehow didn't install for me.
HemangChothani commentedon Oct 7, 2020
@anistark i have tried to install with fresh env and it's working fine, even i tried to install
proto-plusand 'google-cloud-bigquery' with already installed older version ofprotobuf, it successfully uninstall the older version and install the latest version of library.deps: add protobuf dependency (#306)
chore: release 2.2.0 (#321)
aylusltd commentedon Dec 17, 2020
Clean install on AWS Sagemaker CondaPython3 Kernel. Looks like same bug.
anzen-l commentedon Dec 28, 2020
I have the same problem with big query & jupyter notebooks
Tsakunelson commentedon Mar 17, 2021
Hi All,
I am still having this same error, though have all the dependencies installed on a Jupyter Notebook in AWS Sagemaker including: