Title: BigQuery: KeyError when getting query results · Issue #2585 · googleapis/google-cloud-python · GitHub
Open Graph Title: BigQuery: KeyError when getting query results · Issue #2585 · googleapis/google-cloud-python
X Title: BigQuery: KeyError when getting query results · Issue #2585 · googleapis/google-cloud-python
Description: Sample app that reproduces this Stacktrace: Traceback (most recent call last): File "simple_app.py", line 57, in
Open Graph Description: Sample app that reproduces this Stacktrace: Traceback (most recent call last): File "simple_app.py", line 57, in
X Description: Sample app that reproduces this Stacktrace: Traceback (most recent call last): File "simple_app.py", line 57, in <module> query_shakespeare() File "simple_app.py", line 47...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/2585
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"BigQuery: KeyError when getting query results","articleBody":"[Sample app that reproduces this](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/176f161cae3d4f01b01456a6e403faf6645414a1/bigquery/cloud-client/simple_app.py)\n\nStacktrace:\n\n```\nTraceback (most recent call last):\n File \"simple_app.py\", line 57, in \u003cmodule\u003e\n query_shakespeare()\n File \"simple_app.py\", line 47, in query_shakespeare\n page_token=page_token)\n File \"lib/python2.7/site-packages/google/cloud/bigquery/query.py\", line 401, in fetch_data\n rows_data = _rows_from_json(response.get('rows', ()), self.schema)\n File \"lib/python2.7/site-packages/google/cloud/bigquery/_helpers.py\", line 98, in _rows_from_json\n for item in cell['v']])\n File \"lib/python2.7/site-packages/google/cloud/bigquery/_helpers.py\", line 61, in _record_from_json\n for subfield, cell in zip(field.fields, value['f']):\nKeyError: 'f'\n```\n\n---\n\nStepping into the debugger:\n\n``` python\nipdb\u003e value\n{u'v': {u'f': [{u'v': u'hamlet'}, {u'v': u'5318'}]}}\nipdb\u003e field.__dict__\n{'field_type': u'RECORD', 'description': None, 'name': u'title', 'fields': [\u003cgoogle.cloud.bigquery.schema.SchemaField object at 0x7f4ba9227550\u003e, \u003cgoogle.cloud.bigquery.schema.SchemaField object at 0x7f4ba9227690\u003e], 'mode': u'REPEATED'}\n```\n\n(Added by @dhermes)\n","author":{"url":"https://github.com/theacodes","@type":"Person","name":"theacodes"},"datePublished":"2016-10-21T19:32:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/2585/google-cloud-python/issues/2585"}
| 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:c4ad0fd1-5a33-0741-0f1b-54f5d61b2075 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8042:3BEDBF:B7DAEC:FC1BC1:6A4DC518 |
| html-safe-nonce | 1e6542bd8c2058859c101d9831473ff26942accc038f90f024f7f954481a8c05 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDQyOjNCRURCRjpCN0RBRUM6RkMxQkMxOjZBNERDNTE4IiwidmlzaXRvcl9pZCI6IjE1NDc0NTE3MzA0MTI1NTM0OTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | aad5661d7090b12ef1b51c51206a7693113f6a1e760dbb40cff03e296a0a5eb5 |
| hovercard-subject-tag | issue:184552011 |
| 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/google-cloud-python/2585/issue_layout |
| twitter:image | https://opengraph.githubassets.com/663b71134d629efe8dc241f6fc7826fb163771e9278efc7a40fac4b558b4daa4/googleapis/google-cloud-python/issues/2585 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/663b71134d629efe8dc241f6fc7826fb163771e9278efc7a40fac4b558b4daa4/googleapis/google-cloud-python/issues/2585 |
| og:image:alt | Sample app that reproduces this Stacktrace: Traceback (most recent call last): File "simple_app.py", line 57, in |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | theacodes |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| 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 | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width