i have files i'm receiving evernote api (via getresource
) , writing google cloud storage following code:
gcs_file = gcs.open(filename, 'w', content_type=res.mime, retry_params=write_retry_params) # retrieve binary data , write gcs resource_file = note_store.getresource(res.guid, true, false, false, false) gcs_file.write(resource_file.data.body) gcs_file.close()
for types of documents, still works. there documents gcs throws in logs:
unable fetch url: https://storage.googleapis.com/evernoteresources/5db799f1-c03c-4056-812a-6d77bad55261/sleep away.mp3
and
got exception while contacting gcs. retry in 0.11 seconds.
there doesn't seem pattern these errors. happens documents, sounds, pictures, whatever - of these document types work , don't. isn't due size (since small work , large do).
any ideas?
here's full stack trace, though i'm not sure help.
encountered unexpected error protorpc method implementation: timeouterror (('request google cloud storage timed out.', downloaderror('unable fetch url: https://storage.googleapis.com/evernoteresources/78413585-2266-4426-b08c-71d6c224f266/evernote snapshot 20130512 124546.jpg',))) traceback (most recent call last): file "/python27_runtime/python27_lib/versions/1/protorpc/wsgi/service.py", line 181, in protorpc_service_app response = method(instance, request) file "/python27_runtime/python27_lib/versions/1/google/appengine/ext/endpoints/api_config.py", line 972, in invoke_remote return remote_method(service_instance, request) file "/python27_runtime/python27_lib/versions/1/protorpc/remote.py", line 412, in invoke_remote_method response = method(service_instance, request) file "/base/data/home/apps/s~quinector/2a.368528733040360018/endpoints.py", line 61, in get_note_details url = tools.registerresource(note_store, req.note_guid, r) file "/base/data/home/apps/s~quinector/2a.368528733040360018/globalutilities.py", line 109, in registerresource retry_params=write_retry_params) file "/base/data/home/apps/s~quinector/2a.368528733040360018/cloudstorage/cloudstorage_api.py", line 69, in open return storage_api.streamingbuffer(api, filename, content_type, options) file "/base/data/home/apps/s~quinector/2a.368528733040360018/cloudstorage/storage_api.py", line 526, in __init__ status, headers, _ = self._api.post_object(path, headers=headers) file "/base/data/home/apps/s~quinector/2a.368528733040360018/cloudstorage/rest_api.py", line 41, in sync_wrapper return future.get_result() file "/python27_runtime/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 325, in get_result self.check_success() file "/python27_runtime/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py", line 368, in _help_tasklet_along value = gen.throw(exc.__class__, exc, tb) file "/base/data/home/apps/s~quinector/2a.368528733040360018/cloudstorage/storage_api.py", line 84, in do_request_async 'request google cloud storage timed out.', e) timeouterror: ('request google cloud storage timed out.', downloaderror('unable fetch url: https://storage.googleapis.com/evernoteresources/78413585-2266-4426-b08c-71d6c224f266/evernote snapshot 20130512 124546.jpg',))
this bug in gcs client code. should handle filename. fact using http request gcs should "hidden". fixed soon. thanks!
note if quote filename work around bug, filename double quoted after fix. sorry.
Comments
Post a Comment