My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 4346: images.get_serving_url() does not handle blob_info.key() correctly
13 people starred this issue and may be notified of changes. Back to list
 
Project Member Reported by schu...@google.com, Jan 5, 2011
On dev_appserver, calling images.get_serving_url(blob_info.key()) raises a
TypeError because the blob key is expected to be a string, not a BlobKey object.

The same code works on appserver, though.

test code
---------
"""
from google.appengine.ext import blobstore
from google.appengine.api import images

key = 'INSERT-KEY-HERE'

blob_info = blobstore.BlobInfo.get(key)
print images.get_serving_url(blob_info.key())
"""

output
------
"""
Traceback (most recent call last):
  File "SDK/google/appengine/ext/admin/__init__.py", line 219, in post
    exec(compiled_code, globals())
  File "<string>", line 9, in <module>
  File "SDK/google/appengine/api/images/__init__.py", line 965, in get_serving_url
    response)
  File "SDK/google/appengine/api/apiproxy_stub_map.py", line 86, in MakeSyncCall
    return stubmap.MakeSyncCall(service, call, request, response)
  File "SDK/google/appengine/api/apiproxy_stub_map.py", line 286, in MakeSyncCall
    rpc.CheckSuccess()
  File "SDK/google/appengine/api/apiproxy_rpc.py", line 149, in _WaitImpl
    self.request, self.response)
  File "SDK/google/appengine/api/apiproxy_stub.py", line 73, in MakeSyncCall
    if request.ByteSize() > self.__max_request_size:
  File "SDK/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()
"""

Jan 18, 2011
Project Member #1 peter...@google.com
(No comment was entered for this change.)
Labels: Component-Images Component-SDK
Mar 10, 2011
Project Member #2 peter...@google.com
(No comment was entered for this change.)
Labels: log-3326048
Mar 16, 2011
Project Member #3 peter...@google.com
(No comment was entered for this change.)
Status: Started
May 10, 2011
Project Member #4 ma...@google.com
(No comment was entered for this change.)
Status: Fixed
Sign in to add a comment

Powered by Google Project Hosting