This repository was archived by the owner on Mar 31, 2026. It is now read-only.
Description bucket.move_blob not working with url encoded chars in blob name
getting NotFound: 404 POST https://storage.googleapis.com/storage/v1/b/[*bucket_name*]/o/test%2Fblob.csv/moveTo/o/test/blob2.csv?prettyPrint=false : Not Found
Base on the docs (https://cloud.google.com/storage/docs/copying-renaming-moving-objects#move-by-copying ), the URL is not correctly encoded:
DESTINATION_OBJECT_NAME is the URL-encoded name you want to use. For example, pets/cat.png, URL-encoded as pets%2Fcat.png.
Environment details
OS type and version: macOS Sequoia 15.6
Python version: 3.12.9
pip version: 24.0
google-cloud-storage version: 3.3.0
Steps to reproduce
Create a blob with "/" in the name
try to move it with bucket.move_blob
Code example
from google .cloud import storage
gcs = storage .Client ()
bucket = gcs .bucket ("" )
blob = bucket .get_blob ("test/blob.csv" )
bucket .move_blob (
blob ,
new_name = "test/blob2.csv"
)
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
Reactions are currently unavailable
bucket.move_blob not working with url encoded chars in blob name
getting NotFound: 404 POST https://storage.googleapis.com/storage/v1/b/[*bucket_name*]/o/test%2Fblob.csv/moveTo/o/test/blob2.csv?prettyPrint=false: Not Found
Base on the docs (https://cloud.google.com/storage/docs/copying-renaming-moving-objects#move-by-copying), the URL is not correctly encoded:
DESTINATION_OBJECT_NAME is the URL-encoded name you want to use. For example, pets/cat.png, URL-encoded as pets%2Fcat.png.
Environment details
google-cloud-storageversion: 3.3.0Steps to reproduce
Code example
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!