Hi all,

I do a very simple test. Create gs file, write info to it and
finalize.
My App Engine app have permission to Google Cloud Storage as OWNER

I test that from my AppEngine app and I test from remote api.

## CODE ##

path = /gs/bucket/MyFile
mime_type = 'application/octet-stream'
acl = 'public-read-write'
write_path = files.gs.create(path, mime_type = mime_type, acl = acl)

q = MyModel.query()
regs = q.fetch()
for r in regs:
  with files.open(write_path, 'a') as fp:
    fp.write(str(r))

# When I do finalize or f.close(finalized = True) Always fails and
give me ERROR 1
files.finalize(write_path)

## END CODE ##

## ERROR 1 ##
Traceback (most recent call last):
  File "/base/python27_runtime/python27_lib/versions/1/google/
appengine/ext/admin/__init__.py", line 317, in post
    exec(compiled_code, globals())
  File "<string>", line 43, in <module>
  File "/base/data/home/apps/s~semtable/v51r05.357456670132838042/
utils.py", line 1080, in finalize
    files.finalize(write_path)
  File "/base/python27_runtime/python27_lib/versions/1/google/
appengine/api/files/file.py", line 450, in finalize
    f.close(finalize=True)
  File "/base/python27_runtime/python27_lib/versions/1/google/
appengine/api/files/file.py", line 277, in close
    self._make_rpc_call_with_retry('Close', request, response)
  File "/base/python27_runtime/python27_lib/versions/1/google/
appengine/api/files/file.py", line 390, in _make_rpc_call_with_retry
    _make_call(method, request, response)
  File "/base/python27_runtime/python27_lib/versions/1/google/
appengine/api/files/file.py", line 238, in _make_call
    _raise_app_error(e)
  File "/base/python27_runtime/python27_lib/versions/1/google/
appengine/api/files/file.py", line 172, in _raise_app_error
    raise UnknownError()
UnknownError
## END ERROR 1 ##

How can I resolve this problem?

Thanks so much.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to