The error “TransformationError 
<https://cloud.google.com/appengine/docs/standard/python/refdocs/google.appengine.api.images#google.appengine.api.images.Image.execute_transforms>”
 
indicates that an error occurred during image manipulation. You could 
implement a retry mechanism in case you get this exception.

Note that this type of issue is better suited if posted on StackOverflow 
<https://cloud.google.com/support/docs/community>, where the community will 
be able to help you, like the suggestions in this post 
<https://stackoverflow.com/questions/47703942/transformationerror-reasons-get-serving-url-images-api?noredirect=1&lq=1>
.

On Thursday, April 25, 2019 at 8:21:52 AM UTC-4, Rob Curtis wrote:
>
> And like magic, 2 hours later, the tasks stopped failing and then 
> completed.
> Is there anything I should be doing to make this code more robust against 
> this kind of issue?
>
>
> Thanks
> Rob
> On Thursday, April 25, 2019 at 1:18:13 PM UTC+2, Rob Curtis wrote:
>>
>> Hi,
>>
>> We have code in production that writes images to google cloud storage and 
>> gets a blob_key for each file that it writes, then calls 
>> images.get_serving_url_async() for each of the blob_keys
>> *This code has been working in production for years*, but today I 
>> started seeing many TransformationError being raised for files that are 
>> images. 
>> It's worth noting that it only seems to be a problem when I'm writing 25+ 
>> images to cloud storage.
>>
>> Code is like this:
>>
>> #data and filename specified earlier
>>
>> with gcs.open(filename, 'w') as f:
>>     f.write(data)
>>
>>
>> blobstore_filename = u"/gs" + filename
>> blob_key= blobstore.BlobKey(blobstore.create_gs_key(blobstore_filename))
>>
>>
>> image_url_futures.append(images.get_serving_url_async(blob_key, 
>> secure_url=True))
>>
>>
>> #this is outside of function which created the image_url_futures
>>
>> image_blob_serving_urls = [future_url.get_result() for future_url in 
>> image_url_futures]
>>
>>
>> I looked at this question: 
>>
>>
>> https://stackoverflow.com/questions/47703942/transformationerror-reasons-get-serving-url-images-api
>>  
>>
>>    - I can rule out that file isn't an image.
>>    - I had assumed that "with gcs.open(...) would be synchronous, so I 
>>    assume the file has been written. 
>>
>>
>> If I'm missing something or if you're experiencing the same issue, please 
>> let me know.
>> Thanks
>> Rob
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/d2f6bf56-f2cf-4c1c-aa31-827893458eaf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to