Issue with store.py

5 views
Skip to first unread message

drsquidop

unread,
Jan 15, 2011, 12:42:29 AM1/15/11
to CirruxCache
It looks like there is a problem saving blobs using the store when
running deployed. what I am seeing is an error: Invalid HTTP
response code (404) for Blob upload. Valid codes are 301, 302, and
303.
when trying to load an image to the store using the _admin interface

When I add debugging to store.py, it is failing on this line and
logging:
if not blobstore.BlobInfo.get(data):
logging.debug('the blobKey does not exist in the db') # I added
this line
raise web.NotFound()

When I trap the request, it appears that it does not have the same
format as when running locally:

on deploy, the raw data object looks like:

Content-Type: message/external-body; charset=ISO-8859-1; blob-
key=AMIfv950YAfiXoKm9_u8mj_ggTor56CbMicUnmN4peBeJx52G78mA-
Ddbh_uwVWwTRAW_b_jjsJYn6mmLukbWaijcMuKLkp8mHyivY7PYjQCzviWaGzANv2hzzBWQRLG_TxSIOmcaKDzHvw7uBPjZkhmPsO0ko3tBw

but locally, blob-key has quotes around it:

Content-Type: message/external-body; blob-
key="zcC619HeSRaXEfJ0TZ0aOw=="; access-type="X-AppEngine-BlobKey"
MIME-Version: 1.0
Content-Disposition: form-data; name="storeFile";
filename="Columbian5c.jpg"

Have you experienced this?

Interestingly, when I modify the parsing of the data to work without
quotes, the whole key is copied correctly, but it is still failing in
the same place. I understand from some other posts that the blob
interface has some differences between dev and deploy.


Samuel Alba

unread,
Jan 16, 2011, 12:37:54 PM1/16/11
to cirru...@googlegroups.com
I didn't know about such differences on Blobstore between dev and
deploy... Is it possible for you to provide me an access on one of
your appengine dev account having the Blobstore enabled? So I will be
able to debug the problem and provide a fix in the next few days.

Thanks for this feedback, it really helps.

- Sam

> --
> Project page: http://code.google.com/p/cirruxcache/
> News: http://www.shad.cc/tag/cirruxcache
> Groups: http://groups.google.com/group/cirruxcache
>

--
Samuel Alba

Reply all
Reply to author
Forward
0 new messages