google-cloud-python: AttributeError: 'SymbolDatabase' object has no attribute 'RegisterServiceDescriptor'
Today, our daily gcloud ml-engine job has been broken. The problem may come from the changes in the module grpc-google-iam-v1. It seems that you did an update for the module grpc-google-iam-v1 from 0.11.1 (?) to 0.11.3 on the server-side.
I compared the “broken” version with the “working” version. I realized that the only diff is in the module grpc-google-iam-v1.
Python version: Python 2.7
Google-Cloud version:
google-cloud==0.24.0
google-cloud-storage==1.2.0
grpc-google-iam-v1==0.11.3
It has been broken because the pip tried to install grpc-google-iam-v1==0.11.3 which did not have the attribute RegisterServiceDescriptor in the object SymbolDatabase
Stacktrace:
Traceback (most recent call last): File "/usr/local/bin/pip", line 5, in <module> from pkg_resources import load_entry_point File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3074, in <module> @_call_aside File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3058, in _call_aside f(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3102, in _initialize_master_working_set for dist in working_set File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3102, in <genexpr> for dist in working_set File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2633, in activate declare_namespace(pkg) File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2191, in declare_namespace _handle_ns(packageName, path_item) File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2126, in _handle_ns loader.load_module(packageName) File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module mod = imp.load_module(fullname, self.file, self.filename, self.etc) File "/root/.local/lib/python2.7/site-packages/google/cloud/pubsub/__init__.py", line 30, in <module> from google.cloud.pubsub.client import Client File "/root/.local/lib/python2.7/site-packages/google/cloud/pubsub/client.py", line 28, in <module> from google.cloud.pubsub._gax import _PublisherAPI as GAXPublisherAPI File "/root/.local/lib/python2.7/site-packages/google/cloud/pubsub/_gax.py", line 19, in <module> from google.cloud.gapic.pubsub.v1.publisher_client import PublisherClient File "/root/.local/lib/python2.7/site-packages/google/cloud/gapic/pubsub/v1/publisher_client.py", line 37, in <module> from google.iam.v1 import iam_policy_pb2 File "/root/.local/lib/python2.7/site-packages/google/iam/v1/iam_policy_pb2.py", line 296, in <module> _sym_db.RegisterServiceDescriptor(_IAMPOLICY) AttributeError: 'SymbolDatabase' object has no attribute 'RegisterServiceDescriptor'
Steps to reproduce: It’s very easy to reproduce: Cause of #3736, we have to freeze the following version:
google-cloud == 0.24.0
google-cloud-storage == 1.2.0
ps: I did not test the latest version yet but at least the grpc-google-iam-v1==0.11.3 is not compatible with these versions google-cloud
Workaround: freeze the version grpc-google-iam-v1==0.11.1
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 5
- Comments: 22 (12 by maintainers)
Commits related to this issue
- final update for google-auth [(#3967)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/3967) — committed to googleapis/google-cloud-python by leahecole 4 years ago
- move monitoring samples from python-docs-samples (#51) * Add Monitoring v3 Samples Refactor v2 samples in to separate directory Add v3 Samples Renamed auth to list_env * Update requirements... — committed to googleapis/google-cloud-python by arithmetic1728 4 years ago
It seems to be a version conflict, that attribute is just not there in
protobof==3.2.0, but thebeam_fn_api_pbmodule assumes it is:It is there in the current latest version (which is
3.4.0):Since the answer seems to be “upgrade
protobuf”, I am going to pre-emptively close this.If I’m misunderstood the problem and solution, I am sorry. I am certainly happy to re-open this or continue discussion if need be.
On Thursday, September 21, 2017 at 12:31:01 PM UTC-7, Luke Sneeringer wrote:
Is there an eta on the fix? I ran into the same error running a training pipeline today. Or is there a way to modify the ml engine worker environment when submitting a job?