Title: Error listing zones · Issue #24 · googleapis/python-compute · GitHub
Open Graph Title: Error listing zones · Issue #24 · googleapis/python-compute
X Title: Error listing zones · Issue #24 · googleapis/python-compute
Description: Environment details OS type and version: Python version: Python 3.8.7 pip version: 21.0.1 google-cloud-compute version: 0.2.0 Steps to reproduce Call list in zones client Code example from google.cloud import compute client_zones = compu...
Open Graph Description: Environment details OS type and version: Python version: Python 3.8.7 pip version: 21.0.1 google-cloud-compute version: 0.2.0 Steps to reproduce Call list in zones client Code example from google.c...
X Description: Environment details OS type and version: Python version: Python 3.8.7 pip version: 21.0.1 google-cloud-compute version: 0.2.0 Steps to reproduce Call list in zones client Code example from google.c...
Opengraph URL: https://github.com/googleapis/python-compute/issues/24
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error listing zones","articleBody":"#### Environment details\r\n\r\n - OS type and version: \r\n - Python version: Python 3.8.7\r\n - pip version: 21.0.1 \r\n - `google-cloud-compute` version: 0.2.0\r\n\r\n#### Steps to reproduce\r\n\r\n 1. Call list in zones client\r\n\r\n#### Code example\r\n\r\n```python\r\nfrom google.cloud import compute\r\nclient_zones = compute.ZonesClient()\r\nclient_zones.list(project='my-project') #error\r\n```\r\n\r\n#### Stack trace\r\n```\r\nTraceback (most recent call last):\r\n File \"mypath/venv/lib/python3.8/site-packages/google/protobuf/json_format.py\", line 524, in _ConvertFieldValuePair\r\n raise ParseError(\r\ngoogle.protobuf.json_format.ParseError: Message type \"google.cloud.compute.v1.Zone\" has no field named \"supportsPzs\".\r\n Available Fields(except extensions): ['availableCpuPlatforms', 'creationTimestamp', 'deprecated', 'description', 'id', 'kind', 'name', 'region', 'selfLink', 'status']\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"mypath/venv/lib/python3.8/site-packages/google/protobuf/json_format.py\", line 574, in _ConvertFieldValuePair\r\n self.ConvertMessage(item, sub_message)\r\n File \"mypath/venv/lib/python3.8/site-packages/google/protobuf/json_format.py\", line 485, in ConvertMessage\r\n self._ConvertFieldValuePair(value, message)\r\n File \"mypath/venv/lib/python3.8/site-packages/google/protobuf/json_format.py\", line 599, in _ConvertFieldValuePair\r\n raise ParseError(str(e))\r\ngoogle.protobuf.json_format.ParseError: Message type \"google.cloud.compute.v1.Zone\" has no field named \"supportsPzs\".\r\n Available Fields(except extensions): ['availableCpuPlatforms', 'creationTimestamp', 'deprecated', 'description', 'id', 'kind', 'name', 'region', 'selfLink', 'status']\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"main2.py\", line 20, in \u003cmodule\u003e\r\n data = client_zones.list(project='magalu-cliente')\r\n File \"mypath/venv/lib/python3.8/site-packages/google/cloud/compute_v1/services/zones/client.py\", line 470, in list\r\n response = rpc(request, retry=retry, timeout=timeout, metadata=metadata,)\r\n File \"mypath/venv/lib/python3.8/site-packages/google/api_core/gapic_v1/method.py\", line 145, in __call__\r\n return wrapped_func(*args, **kwargs)\r\n File \"mypath/venv/lib/python3.8/site-packages/google/api_core/grpc_helpers.py\", line 73, in error_remapped_callable\r\n return callable_(*args, **kwargs)\r\n File \"mypath/venv/lib/python3.8/site-packages/google/cloud/compute_v1/services/zones/transports/rest.py\", line 203, in list\r\n return compute.ZoneList.from_json(response.content)\r\n File \"mypath/venv/lib/python3.8/site-packages/proto/message.py\", line 369, in from_json\r\n Parse(payload, instance._pb, ignore_unknown_fields=False) #checkpoint_alcides\r\n File \"mypath/venv/lib/python3.8/site-packages/google/protobuf/json_format.py\", line 434, in Parse\r\n return ParseDict(js, message, ignore_unknown_fields, descriptor_pool)\r\n File \"mypath/venv/lib/python3.8/site-packages/google/protobuf/json_format.py\", line 454, in ParseDict\r\n parser.ConvertMessage(js_dict, message)\r\n File \"mypath/venv/lib/python3.8/site-packages/google/protobuf/json_format.py\", line 485, in ConvertMessage\r\n self._ConvertFieldValuePair(value, message)\r\n File \"mypath/venv/lib/python3.8/site-packages/google/protobuf/json_format.py\", line 597, in _ConvertFieldValuePair\r\n raise ParseError('Failed to parse {0} field: {1}.'.format(name, e))\r\ngoogle.protobuf.json_format.ParseError: Failed to parse items field: Message type \"google.cloud.compute.v1.Zone\" has no field named \"supportsPzs\".\r\n Available Fields(except extensions): ['availableCpuPlatforms', 'creationTimestamp', 'deprecated', 'description', 'id', 'kind', 'name', 'region', 'selfLink', 'status'].\r\n```\r\n\r\n#### Quick fix (maybe temporary)\r\n\r\nChanging `google/cloud/compute_v1/services/zones/transports/rest.py`, line 203 from\r\n```python\r\n return compute.ZoneList.from_json(response.content)\r\n```\r\nto\r\n```python\r\n return compute.ZoneList.from_json(response.content, ignore_unknown_fields=True)\r\n```\r\n\r\n","author":{"url":"https://github.com/alcidesmig","@type":"Person","name":"alcidesmig"},"datePublished":"2021-02-24T14:52:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/24/python-compute/issues/24"}
| 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:238f9229-b7e0-e172-8f97-abf21caa194e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B84:126D75:B6507D:10B138B:6A4E23D5 |
| html-safe-nonce | 46110bb02edf64909c05eeffdf99b0358249c3c4d3045a4466bcf5746409748f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Qjg0OjEyNkQ3NTpCNjUwN0Q6MTBCMTM4Qjo2QTRFMjNENSIsInZpc2l0b3JfaWQiOiI4NDYzODA4MjU3NzUxNjU1MzgxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e0ad9f29bf87f42a8a11d0135ec0687fbe37e111c371d37bbb89b7658ed23991 |
| hovercard-subject-tag | issue:815551960 |
| 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-compute/24/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f7197ebb5e986411bde5753b0c2efe2e64b07d530ec5d2ecee073be517324de4/googleapis/python-compute/issues/24 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f7197ebb5e986411bde5753b0c2efe2e64b07d530ec5d2ecee073be517324de4/googleapis/python-compute/issues/24 |
| og:image:alt | Environment details OS type and version: Python version: Python 3.8.7 pip version: 21.0.1 google-cloud-compute version: 0.2.0 Steps to reproduce Call list in zones client Code example from google.c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alcidesmig |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-compute git https://github.com/googleapis/python-compute.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 328021905 |
| octolytics-dimension-repository_nwo | googleapis/python-compute |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 328021905 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-compute |
| 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 | 5fe497b4815fcce3df76c0e246faa739a82c3124 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width