Looks like a bug to me. I filed http://code.google.com/p/googleappengine/issues/detail?id=4346. If you want a quick fix, use """ url = images.get_serving_url(str(blob_info.key())) # wrapped the key in a str() call """
thanks for the report, robert On Jan 5, 1:48 pm, john <[email protected]> wrote: > I can crash the dev server when it is running the Blobstore "Complete > Sample App" > (http://code.google.com/appengine/docs/python/blobstore/overview.html#... > ) by adding a call toimages.get_serving_url. Would someone be willing > to try this to see if they also get anerror? > > To crash the sample app, add these two lines to the end of the > UploadHandler.post() method, just before the redirect: > > from google.appengine.api import images > url =images.get_serving_url(blob_info.key()) > > For what it's worth, I can also crash the sample app by putting these > two lines in the ServerHandler.get() method. > > If someone can help me get theimages.get_serving_url() function to > "work", I would really appreciate it. I've been dead in the water on > this for days. > > On Jan 2, 3:54 pm, john <[email protected]> wrote: > > > > > > > > > Using the dev server, I am trying to display some image files stored > > in the blobstore. However, when I callimages.get_serving_url(), I get > > a pythonerrorsaying that the BlobKey passed in to the function has > > no len() method. I wouldn't expect BlobKey to have a len() method, so > > I presume something else is wrong. > > > I will paste the traceback below -- can anyone help me figure out what > > is wrong? > > > File "C:\Program Files\Google\google_appengine\google\appengine\api > > \images\__init__.py", line 965, in get_serving_url > > response) > > File "C:\Program Files\Google\google_appengine\google\appengine\api > > \apiproxy_stub_map.py", line 86, in MakeSyncCall > > return stubmap.MakeSyncCall(service, call, request, response) > > File "C:\Program Files\Google\google_appengine\google\appengine\api > > \apiproxy_stub_map.py", line 286, in MakeSyncCall > > rpc.CheckSuccess() > > File "C:\Program Files\Google\google_appengine\google\appengine\api > > \apiproxy_rpc.py", line 149, in _WaitImpl > > self.request, self.response) > > File "C:\Program Files\Google\google_appengine\google\appengine\api > > \apiproxy_stub.py", line 73, in MakeSyncCall > > if request.ByteSize() > self.__max_request_size: > > File "C:\Program Files\Google\google_appengine\google\appengine\api > > \images\images_service_pb.py", line 2090, in ByteSize > > n += self.lengthString(len(self.blob_key_)) > > TypeError: object of type 'BlobKey' has no len() -- 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.
