Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloading factory blob fails because media_link isn't available #1555

Closed
jlowin opened this issue Mar 2, 2016 · 1 comment
Closed

Downloading factory blob fails because media_link isn't available #1555

jlowin opened this issue Mar 2, 2016 · 1 comment
Assignees
Labels
api: storage Issues related to the Cloud Storage API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@jlowin
Copy link

jlowin commented Mar 2, 2016

Creating a blob like this loads the blob's properties, so downloading works (if it exists) since the download_url is available:

blob = client.bucket(bucket_name).get_blob(blob_name)
blob.download_as_string() # works

But this doesn't load properties, so the download fails (even in the blob is valid):

blob = client.bucket(bucket_name).blob(blob_name) # note .blob() instead of .get_blob()
blob.download_as_string() # fail, no URI
@jgeewax
Copy link
Contributor

jgeewax commented Mar 2, 2016

Yea, this makes sense. We should fetch the metadata if it's not there already.

@jgeewax jgeewax added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. api: storage Issues related to the Cloud Storage API. labels Mar 2, 2016
@tseaver tseaver closed this as completed in 05ee5d0 Mar 3, 2016
tseaver added a commit that referenced this issue Mar 3, 2016
#1555: reload missing properties before blob download
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants