question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dataproc: AttributeError: 'module' object has no attribute 'OperationsStub'

See original GitHub issue

OS: x86_64 GNU/Linux Python 2.7.6 google-cloud-dataproc version: 0.1.0 google-cloud version: 0.32.0 google-api-core version: 1.1.2

Getting this error on creating a new ClusterControllerClient. Code to reproduce below.

$ python
>>> from google.cloud import dataproc_v1
>>> dataproc_client = dataproc_v1.ClusterControllerClient()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/google/cloud/dataproc_v1/gapic/cluster_controller_client.py", line 101, in __init__
    google.api_core.operations_v1.OperationsClient(channel))
  File "/usr/local/lib/python2.7/dist-packages/google/api_core/operations_v1/operations_client.py", line 59, in __init__
    self.operations_stub = operations_pb2.OperationsStub(channel)
AttributeError: 'module' object has no attribute 'OperationsStub'

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bencaine1commented, Jan 31, 2019

Just in case anyone is interested: the problem for me was that I had a bad installation of googleapis-common-protos. My version was 1.6.0b6. Installing version 1.5.6 fixed the problem.

0reactions
tseavercommented, Jul 24, 2018

@bencaine1 Great, I’m glad that works for you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError: module 'google.cloud.storage' has no attribute ...
Firstly, the error is very clear, google.cloud.storage is a python package, it is not an object so it doesn't have open() method or...
Read more >
'module' object has no attribute 'running_on_devserver'
AttributeError : 'module' object has no attribute 'running_on_devserver'. 445 views ... I'm using standard app engine environment with python.
Read more >
Package google.cloud.dataproc.v1
Autoscaling config for the policy associated with the cluster. Cluster does not autoscale if this field is unset. security_config.
Read more >
airflow.providers.google.cloud.operators.dataproc
"""This module contains Google Dataproc operators. ... pylint: disable=no-name-in-module Cluster, Duration, FieldMask, ) from google.protobuf.json_format ...
Read more >
module 'google.longrunning.operations_pb2' has no attribute ...
AttributeError : module 'google.longrunning.operations_pb2' has no attribute 'OperationsStub'というエラー · 前提・実現したいこと · 発生している問題 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found