Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

from_grpc fails with got an unexpected keyword argument 'retry' #87

Closed
Assignees
tseaverbusunkim96
Labels
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.
@rodis

Description

@rodis

A call tofrom_grpc fails with

Traceback (most recent call last):  File "deploy.py", line 43, in <module>    main()  File "deploy.py", line 36, in main    if op.done() == True:  File "/home/rosariod/.virtualenv/automl/lib/python3.6/site-packages/google/api_core/operation.py", line 170, in done    self._refresh_and_update(retry)  File "/home/rosariod/.virtualenv/automl/lib/python3.6/site-packages/google/api_core/operation.py", line 157, in _refresh_and_update    self._operation = self._refresh(retry=retry)TypeError: _refresh_grpc() got an unexpected keyword argument 'retry'

It seems like it sets_refresh_grpc as self._refresh for the Operation objecthttps://github.com/googleapis/python-api-core/blob/master/google/api_core/operation.py#L299 but when_refresh_and_update is called bydone, it gets and passes down to_refresh_grpc aretry paramhttps://github.com/googleapis/python-api-core/blob/master/google/api_core/operation.py#L157 that_refresh_grpc doesn't know how to handlehttps://github.com/googleapis/python-api-core/blob/master/google/api_core/operation.py#L251 causing the error above.

It might be that theretry param could be correctly handled when the Operation object is created byfrom_gapic because in that case self._refresh is set tooperations_client.get_operationhttps://github.com/googleapis/python-api-core/blob/master/google/api_core/operation.py#L325 which might be aware of theretry param but doesn't seem to be the case forfrom_grpc andfrom_http_json.

Metadata

Metadata

Labels

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


    [8]ページ先頭

    ©2009-2025 Movatter.jp