- Notifications
You must be signed in to change notification settings - Fork95
Description
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.