ApplicationError: 108 when trying to open a blob as a file?

153 views
Skip to first unread message

Justin LeFebvre

unread,
Feb 15, 2012, 2:10:24 PM2/15/12
to Google App Engine
I'm trying to write a generated csv file line by line to the
blobstore, using the task queue, which will be eventually uploaded to
google docs and recently saw the following error. I am using the
python API.

File "/base/data/home/apps/cloudlock11/5-2-11.356657273301426337/gapps/
export.py", line 391, in write_lines
with files.open(blob_name, 'a') as csv_output:
File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/files/file.py", line 427, in open
exclusive_lock=exclusive_lock)
File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/files/file.py", line 260, in __init__
self._open()
File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/files/file.py", line 384, in _open
self._make_rpc_call_with_retry('Open', request, response)
File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/files/file.py", line 388, in _make_rpc_call_with_retry
_make_call(method, request, response)
File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/files/file.py", line 236, in _make_call
_raise_app_error(e)
File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/files/file.py", line 204, in _raise_app_error
raise Error(str(e))
Error: ApplicationError: 108

I have never seen this before and interestingly enough it happened
after already writing 44400 rows to the blob. I was wondering what
this error means. Also, When the task goes to retry, I get this error.

File "/base/data/home/apps/cloudlock11/5-2-11.356657273301426337/
gapps/export.py", line 391, in write_lines
with files.open(blob_name, 'a') as csv_output:
File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/files/file.py", line 427, in open
exclusive_lock=exclusive_lock)
File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/files/file.py", line 260, in __init__
self._open()
File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/files/file.py", line 384, in _open
self._make_rpc_call_with_retry('Open', request, response)
File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/files/file.py", line 388, in _make_rpc_call_with_retry
_make_call(method, request, response)
File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/files/file.py", line 236, in _make_call
_raise_app_error(e)
File "/base/python_runtime/python_lib/versions/1/google/appengine/
api/files/file.py", line 203, in _raise_app_error
raise ExclusiveLockFailedError()
ExclusiveLockFailedError

Can anyone help me with this?

Justin LeFebvre

unread,
Apr 3, 2012, 2:32:22 PM4/3/12
to Google App Engine
I'm still seeing this. Has anyone else seen this issue? I would love
to get an answer on this. Thanks.

Maciek Ruckgaber

unread,
Aug 2, 2012, 1:35:21 PM8/2/12
to google-a...@googlegroups.com
Just in case you are still around,  I've got this one. Instead of using with ... finalize, it worked when using simple open() close(finalize=True) see below : 

some_file = files.blobstore.create(mime_type=exporter.MIME_TYPE, _blobinfo_uploaded_filename=fname)
out_stream = files.open(some_file,'a')
out_stream.write("Something")
out_stream.close(finalize=True)
some_blob_key = files.blobstore.get_blob_key(some_file)

Cheers

On Thursday, August 2, 2012 1:18:24 AM UTC-5, Maciek Ruckgaber wrote:
I'm Experimenting the same problem. Seems exclusive to tasks via taskqueue or running on backend instances. The problem is solved if you use deferred instead, buy then you get another problem regarding _local scope request variables.  I've been googling for someone else with this issue but can't seem to find anything useful.

Cheers
Reply all
Reply to author
Forward
0 new messages