Content-Length: 303044 | pFad | https://github.com/googleapis/python-dataproc/issues/51

44 Wrong protobuf type in ClusterControllerClient.diagnose_cluster · Issue #51 · googleapis/python-dataproc · GitHub
Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Wrong protobuf type in ClusterControllerClient.diagnose_cluster #51

Closed
@turbaszek

Description

@turbaszek

Environment details

  • OS type and version: MacOS 10.15.4
  • Python version: 3.6.8
  • pip version: pip --version
  • google-cloud-dataproc version: 1.0.0

Steps to reproduce

  1. Create cluster
  2. Initialize ClusterControllerClient
  3. run diagnose_cluster on the cluster
  4. use .result() to wait for the operation to complete

Code example

client = ClusterControllerClient()
operation = client.diagnose_cluster(
    project_id=project_id,
    region=region,
    cluster_name=cluster_name,
    retry=retry,
    timeout=timeout,
    metadata=metadata,
)
operation.result()

Stack trace

  File "~/airflow/airflow/providers/google/cloud/hooks/dataproc.py", line 387, in diagnose_cluster
    operation.result()
  File "~/.virtualenvs/airflow/lib/python3.6/site-packages/google/api_core/future/polling.py", line 125, in result
    self._blocking_poll(timeout=timeout)
  File "~/.virtualenvs/airflow/lib/python3.6/site-packages/google/api_core/future/polling.py", line 104, in _blocking_poll
    retry_(self._done_or_raise)()
  File "~/.virtualenvs/airflow/lib/python3.6/site-packages/google/api_core/retry.py", line 286, in retry_wrapped_func
    on_error=on_error,
  File "~/.virtualenvs/airflow/lib/python3.6/site-packages/google/api_core/retry.py", line 184, in retry_target
    return target()
  File "~/.virtualenvs/airflow/lib/python3.6/site-packages/google/api_core/future/polling.py", line 83, in _done_or_raise
    if not self.done():
  File "~/.virtualenvs/airflow/lib/python3.6/site-packages/google/api_core/operation.py", line 169, in done
    self._refresh_and_update(retry)
  File "~/.virtualenvs/airflow/lib/python3.6/site-packages/google/api_core/operation.py", line 158, in _refresh_and_update
    self._set_result_from_operation()
  File "~/.virtualenvs/airflow/lib/python3.6/site-packages/google/api_core/operation.py", line 131, in _set_result_from_operation
    self._result_type, self._operation.response
  File "~/.virtualenvs/airflow/lib/python3.6/site-packages/google/api_core/protobuf_helpers.py", line 71, in from_any_pb
    any_pb.__class__.__name__, pb_type.__name__
TypeError: Could not convert Any to Empty

I tried to debug this code and use google.protobuf.any_pb2.Any but then I get TypeError: Could not convert Any to Any.

Metadata

Metadata

Assignees

Labels

api: dataprocIssues related to the googleapis/python-dataproc API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/googleapis/python-dataproc/issues/51

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy