Title: from_grpc fails with got an unexpected keyword argument 'retry' · Issue #87 · googleapis/python-api-core · GitHub
Open Graph Title: from_grpc fails with got an unexpected keyword argument 'retry' · Issue #87 · googleapis/python-api-core
X Title: from_grpc fails with got an unexpected keyword argument 'retry' · Issue #87 · googleapis/python-api-core
Description: A call to from_grpc fails with Traceback (most recent call last): File "deploy.py", line 43, in
Open Graph Description: A call to from_grpc fails with Traceback (most recent call last): File "deploy.py", line 43, in
X 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: Fi...
Opengraph URL: https://github.com/googleapis/python-api-core/issues/87
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"from_grpc fails with got an unexpected keyword argument 'retry'","articleBody":"A call to `from_grpc` fails with \r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"deploy.py\", line 43, in \u003cmodule\u003e\r\n main()\r\n File \"deploy.py\", line 36, in main\r\n if op.done() == True:\r\n File \"/home/rosariod/.virtualenv/automl/lib/python3.6/site-packages/google/api_core/operation.py\", line 170, in done\r\n self._refresh_and_update(retry)\r\n File \"/home/rosariod/.virtualenv/automl/lib/python3.6/site-packages/google/api_core/operation.py\", line 157, in _refresh_and_update\r\n self._operation = self._refresh(retry=retry)\r\nTypeError: _refresh_grpc() got an unexpected keyword argument 'retry'\r\n```\r\n\r\nIt 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.\r\n\r\nIt 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`.","author":{"url":"https://github.com/rodis","@type":"Person","name":"rodis"},"datePublished":"2020-10-06T15:35:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/87/python-api-core/issues/87"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:294696a1-d561-a798-0717-c4b130194d1b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BA7E:2373EB:4F3411E:7011480:6A4FE162 |
| html-safe-nonce | c03f3fb9adeffa21da06d9c0c2f952fe4b5feadbe6b77253877ee85a02bb4bea |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTdFOjIzNzNFQjo0RjM0MTFFOjcwMTE0ODA6NkE0RkUxNjIiLCJ2aXNpdG9yX2lkIjoiMzYxNjQzNDg3ODE2NDIzMDQ5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f3c2d09fd754b910e54248d24010e2f7fbcd96f91c30049cdccb2c147df0b7b9 |
| hovercard-subject-tag | issue:715797955 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-api-core/87/issue_layout |
| twitter:image | https://opengraph.githubassets.com/14710fd70e5d95708d2d3a6c689b7bc246a3c5aa7a2d56b19659c35b105d1e07/googleapis/python-api-core/issues/87 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/14710fd70e5d95708d2d3a6c689b7bc246a3c5aa7a2d56b19659c35b105d1e07/googleapis/python-api-core/issues/87 |
| og:image:alt | A call to from_grpc fails with Traceback (most recent call last): File "deploy.py", line 43, in |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rodis |
| hostname | github.com |
| expected-hostname | github.com |
| None | 19b98c3d9767bb8a56238a89ff8401d1cbdf3bc5c353799aacf49fe6c76b4b7c |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-api-core git https://github.com/googleapis/python-api-core.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992456 |
| octolytics-dimension-repository_nwo | googleapis/python-api-core |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992456 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-api-core |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 142593e66413bbae27fd485859993597d5a3b104 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width