I fixed this issue by removing the content_type argument in the open call. 
I'm not sure if this could cause any side effects but our task queue for 
zipping files cleared up with no problems.

We want to migrate to Python 3 in the future but the App Engine Cloud 
Storage library doesn't support Python 3 nor does it seem like it ever will 
( https://github.com/GoogleCloudPlatform/appengine-gcs-client/issues/78 ). 
I wonder if zipping multiple files like this is still possible using the 
newer google-cloud-storage library.

On Thursday, 4 July 2019 17:18:14 UTC-4, Kyle Chessman wrote:
>
> I've been having the same problem since June 28. All other GCS operations 
> have been continuing just fine.
>
> On Thursday, 27 June 2019 22:59:09 UTC-4, Friso Kluit wrote:
>>
>> Using App Engine Python 2.7 Standard
>>
>> Since about two hours, my operation to create a zip file on GCS is 
>> failing. Before this, it was working fine. 
>> The following line 
>>
>> import cloudstorage as gcs
>> ...
>> with gcs.open(new_zf.gcs_filename, 'w', content_type=b'multipart/x-zip',
>>                   options={b'x-goog-acl': b'public-read', 
>> b'cache-control': b'private, max-age=0, no-cache'}) as nzf:
>>
>> triggers this error
>>
>> <Error><Code>InvalidAuthentication</Code><Message>The provided 
>> authentication header is invalid.</Message><Details>Cannot use OAuth 
>> Authorization header with form POST.</Details></Error>". Extra info: None.
>>
>> I have tried to change permissions on my roles on GCS from Storage Legacy 
>> Owner to Storage Admin
>>
>> but I get a 'Sorry, there’s a problem. If you entered information, check 
>> it and try again. Otherwise, the problem might clear up on its own, so 
>> check back later.'  error
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/8c64bb95-781f-4759-8b60-f3bc7ccdaa90%40googlegroups.com.

Reply via email to