Title: `Blob.rewrite()` does not work with batches. · Issue #32 · googleapis/python-storage · GitHub
Open Graph Title: `Blob.rewrite()` does not work with batches. · Issue #32 · googleapis/python-storage
X Title: `Blob.rewrite()` does not work with batches. · Issue #32 · googleapis/python-storage
Description: google-cloud-storage v1.8.0 Not sure whether rewrites are supposed to work when batched, but it would be nice and useful if they did, otherwise there's no efficient way to copy lots of blobs across buckets in different locations or with ...
Open Graph Description: google-cloud-storage v1.8.0 Not sure whether rewrites are supposed to work when batched, but it would be nice and useful if they did, otherwise there's no efficient way to copy lots of blobs across...
X Description: google-cloud-storage v1.8.0 Not sure whether rewrites are supposed to work when batched, but it would be nice and useful if they did, otherwise there's no efficient way to copy lots of blobs ac...
Opengraph URL: https://github.com/googleapis/python-storage/issues/32
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`Blob.rewrite()` does not work with batches.","articleBody":"google-cloud-storage v1.8.0\r\n\r\nNot sure whether rewrites are supposed to work when batched, but it would be nice and useful if they did, otherwise there's no efficient way to copy lots of blobs across buckets in different locations or with different encryption keys.\r\n\r\nExample:\r\n```\r\nwith gcs_client.batch():\r\n dest_blob.rewrite(src_blob)\r\n```\r\nTraceback:\r\n```\r\nTraceback (most recent call last):\r\n File \"batch_test.py\", line 10, in \u003cmodule\u003e\r\n dest_blob.rewrite(src_blob)\r\n File \".../pyvirtenv/python-common/lib/python2.7/site-packages/google/cloud/storage/blob.py\", line 1359, in rewrite\r\n rewritten = int(api_response['totalBytesRewritten'])\r\n File \".../pyvirtenv/python-common/lib/python2.7/site-packages/google/cloud/storage/batch.py\", line 105, in __getitem__\r\n raise KeyError('Cannot get item %r from a future' % (key,))\r\nKeyError: \"Cannot get item 'totalBytesRewritten' from a future\"\r\n```","author":{"url":"https://github.com/bits01","@type":"Person","name":"bits01"},"datePublished":"2018-03-19T01:43:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/32/python-storage/issues/32"}
| 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:4a9ae2a8-19ab-75a1-e52e-9a132ca82b04 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E35C:4F8A:F140C3:145911C:6A4ED92A |
| html-safe-nonce | 59081872f991bbfebb2b16a466d10f24daaef6f50d3f50d50b5cf58ed6365504 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzVDOjRGOEE6RjE0MEMzOjE0NTkxMUM6NkE0RUQ5MkEiLCJ2aXNpdG9yX2lkIjoiODcwMDMyOTQxMzc5NzkyNzIxMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fa6997741120daaea25e4aeb945a3bf858737af1f2228d9a33f5c31319e124d2 |
| hovercard-subject-tag | issue:558430432 |
| 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-storage/32/issue_layout |
| twitter:image | https://opengraph.githubassets.com/88076fb8f7fdb7073284d8beb62fd839e54ee486f478bde3b0e232db85cb9d4a/googleapis/python-storage/issues/32 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/88076fb8f7fdb7073284d8beb62fd839e54ee486f478bde3b0e232db85cb9d4a/googleapis/python-storage/issues/32 |
| og:image:alt | google-cloud-storage v1.8.0 Not sure whether rewrites are supposed to work when batched, but it would be nice and useful if they did, otherwise there's no efficient way to copy lots of blobs across... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bits01 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-storage git https://github.com/googleapis/python-storage.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992639 |
| octolytics-dimension-repository_nwo | googleapis/python-storage |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992639 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-storage |
| 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 | c37fe3e3f5f306900bd5b6bee97463f66c938b2c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width