Title: raise unexpected exception while property value is [] · Issue #403 · googleapis/google-cloud-python · GitHub
Open Graph Title: raise unexpected exception while property value is [] · Issue #403 · googleapis/google-cloud-python
X Title: raise unexpected exception while property value is [] · Issue #403 · googleapis/google-cloud-python
Description: the following sample code entity = Entity(dataset, 'test') entity['a'] = [] entity.save() will raise exception File "/usr/local/lib/python2.7/dist-packages/gcloud-0.3.0-py2.7.egg/gcloud/datastore/entity.py", line 244, in save exclude_fro...
Open Graph Description: the following sample code entity = Entity(dataset, 'test') entity['a'] = [] entity.save() will raise exception File "/usr/local/lib/python2.7/dist-packages/gcloud-0.3.0-py2.7.egg/gcloud/datastore/e...
X Description: the following sample code entity = Entity(dataset, 'test') entity['a'] = [] entity.save() will raise exception File "/usr/local/lib/python2.7/dist-packages/gcloud-0.3.0-py2.7.e...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/403
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"raise unexpected exception while property value is []","articleBody":"the following sample code \n\n``` python\nentity = Entity(dataset, 'test')\nentity['a'] = []\nentity.save()\n```\n\nwill raise exception\n\n```\nFile \"/usr/local/lib/python2.7/dist-packages/gcloud-0.3.0-py2.7.egg/gcloud/datastore/entity.py\", line 244, in save\n exclude_from_indexes=self.exclude_from_indexes())\n File \"/usr/local/lib/python2.7/dist-packages/gcloud-0.3.0-py2.7.egg/gcloud/datastore/connection.py\", line 429, in save_entity\n result = self.commit(dataset_id, mutation)\n File \"/usr/local/lib/python2.7/dist-packages/gcloud-0.3.0-py2.7.egg/gcloud/datastore/connection.py\", line 329, in commit\n datastore_pb.CommitResponse)\n File \"/usr/local/lib/python2.7/dist-packages/gcloud-0.3.0-py2.7.egg/gcloud/datastore/connection.py\", line 81, in _rpc\n data=request_pb.SerializeToString())\n File \"/usr/local/lib/python2.7/dist-packages/google/protobuf/internal/python_message.py\", line 813, in SerializeToString\n self.DESCRIPTOR.full_name, ','.join(self.FindInitializationErrors())))\nEncodeError: Message api.services.datastore.CommitRequest is missing required fields: mutation.upsert[0].property[0].value\n```\n\n\u003e It (protobuf) makes no distinction between an empty list and a null list.\n\nhttp://stackoverflow.com/questions/2378666/protobuf-net-serializing-an-empty-list\nit looks like a property with empty list should be skip entirely\n","author":{"url":"https://github.com/lucemia","@type":"Person","name":"lucemia"},"datePublished":"2014-12-03T07:21:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/403/google-cloud-python/issues/403"}
| 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:12a53680-574c-8da3-1ca4-edbb9701f62a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BCA8:AE2FC:39EFB:4E72E:6A4D7D79 |
| html-safe-nonce | c66cc58e98dd3c0e8914511a14bcaf1f4ce6d6b40dacf8140c03d08973c4e97a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQ0E4OkFFMkZDOjM5RUZCOjRFNzJFOjZBNEQ3RDc5IiwidmlzaXRvcl9pZCI6IjUwMjA0ODQyNTQ0Mzk0MDY5NjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7e3edeb65402249d10fb3b9006cc805725567d1ea450fe7770e445b3df3f09d2 |
| hovercard-subject-tag | issue:50794054 |
| 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/403/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b3a8fe6aa63b3c7e72a479ce22b9786fd98a6b777d2e971db7db43dca65bea32/googleapis/google-cloud-python/issues/403 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b3a8fe6aa63b3c7e72a479ce22b9786fd98a6b777d2e971db7db43dca65bea32/googleapis/google-cloud-python/issues/403 |
| og:image:alt | the following sample code entity = Entity(dataset, 'test') entity['a'] = [] entity.save() will raise exception File "/usr/local/lib/python2.7/dist-packages/gcloud-0.3.0-py2.7.egg/gcloud/datastore/e... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lucemia |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f8e15305e2ab58890ca84b830615e375f5df303cf471cafcba0c08272981be3 |
| 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 | 8608b0750fc35e283e5ec5b094bff942d7a0e197 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width