Description
A call to from_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 object https://github.com/googleapis/python-api-core/blob/master/google/api_core/operation.py#L299 but when _refresh_and_update
is called by done
, it gets and passes down to _refresh_grpc
a retry
param https://github.com/googleapis/python-api-core/blob/master/google/api_core/operation.py#L157 that _refresh_grpc
doesn't know how to handle https://github.com/googleapis/python-api-core/blob/master/google/api_core/operation.py#L251 causing the error above.
It might be that the retry
param could be correctly handled when the Operation object is created by from_gapic
because in that case self._refresh is set to operations_client.get_operation
https://github.com/googleapis/python-api-core/blob/master/google/api_core/operation.py#L325 which might be aware of the retry
param but doesn't seem to be the case for from_grpc
and from_http_json
.