Here is the traceback:
Traceback (most recent call last):
  File "c:\Google\AppEngine\esentrnet\gluon\restricted.py", line 188,
in restricted
    exec ccode in environment
  File "c:\Google\AppEngine\esentrnet\applications\init/controllers/
default.py:upbm2gig", line 246, in <module>
  File "c:\Google\AppEngine\esentrnet\gluon\globals.py", line 95, in
<lambda>
    self._caller = lambda f: f()
  File "c:\Google\AppEngine\esentrnet\applications\init/controllers/
default.py:upbm2gig", line 93, in upbm2gig
  File "applications\init\modules\controllers\default_module.py", line
1951, in upbm2gig
    upload_url =
blobstore.create_upload_url(URL(r=request,c='default',f='upbm2gig_gaehandler',args=None))
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine
\api\blobstore\blobstore.py", line 192, in create_upload_url
    _make_sync_call('blobstore', 'CreateUploadURL', request, response)
  File "C:\Program Files (x86)\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 (x86)\Google\google_appengine\google\appengine
\api\apiproxy_stub_map.py", line 286, in MakeSyncCall
    rpc.CheckSuccess()
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine
\api\apiproxy_rpc.py", line 149, in _WaitImpl
    self.request, self.response)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine
\api\apiproxy_stub.py", line 80, in MakeSyncCall
    method(request, response)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine
\api\blobstore\blobstore_stub.py", line 218, in
_Dynamic_CreateUploadURL
    users.get_current_user())
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine
\api\blobstore\blobstore_stub.py", line 204, in _CreateSession
    user)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine
\api\blobstore\blobstore_stub.py", line 79, in CreateUploadSession
    'state': 'init'})
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine
\api\datastore.py", line 638, in update
    self.__setitem__(name, value)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine
\api\datastore.py", line 617, in __setitem__
    datastore_types.ValidateProperty(name, value)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine
\api\datastore_types.py", line 1323, in ValidateProperty
    'Unsupported type for property %s: %s' % (name, v.__class__))
BadValueError: Unsupported type for property success_path: <class
'gluon.html.XML'>


On Mar 12, 1:28 pm, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
> I do not think we ever said URL returns a string. We did this change
> in a way that did not break any example in the book. I will look more
> carefully at your example and treat it as a web2py bug. I am sure we
> can make it work.
> Can you post the complete traceback?
>
> Massimo
>
> On Mar 12, 11:12 am, Carl Roach <m...@carlroach.com> wrote:
>
>
>
>
>
>
>
> > Thanks for the tip - that saves me GAE debugging time - always welcomed.
>
> > The Web2py guys take backward compatiblilty v. seriously so there must be a 
> > reasonable reason for this change. I've searched GoogleGroups but couldn't 
> > find past threads but the search isn't great and I turned nothing up.
>
> > On 12 Mar 2011, at 15:55, dlypka <dly...@gmail.com> wrote:
>
> > > FYI:I found a *GOTCHA* issue when upgrading to 1.92.3 from 1.77.3
> > > Now you have to use .xml() on the URL() that you send into the GAE
> > > API:
>
> > >   upload_url =
> > > blobstore.create_upload_url(URL(r=request,c='default',f='upbm2gig_gaehandle
> > >  r',args=None).xml())
> > >      # This works
>
> > >   upload_url =
> > > blobstore.create_upload_url(URL(r=request,c='default',f='upbm2gig_gaehandle
> > >  r',args=None))
> > >      # This crashes
>
> > > It crashes because between 1.77.3 and 1.92.3, a change was made in
> > > html.py in the URL() class.
>
> > > Around html.py line 265, they added XML() around the return value.
>
> > >    return XML(rewrite.url_out(r or _request, env, application,
> > > controller, function, args, other, scheme, host, port))
>
> > > In 1.77.3 it was formerly:
> > >    return rewrite.url_out(r or _request, env,....)
>
> > > So basically they have changed the signature of the URL() object.
> > > Not very backward compatible, I would say...
>
> > > On Mar 12, 12:48 am, Carl Roach <m...@carlroach.com> wrote:
> > >> thanks howesc
>
> > >> On 11 Mar 2011, at 23:29, howesc <how...@umich.edu> wrote:
>
> > >>> i use taskqueue extensively in my GAE apps.  i have not wrapped it in a 
> > >>> way that it runs in non-gae environment.  My usages of the taskqueue 
> > >>> are for things that i can't complete in a single 30 second execution 
> > >>> time, so i suppose i could put an 'if not GAE run all the processing in 
> > >>> one request' type statement.
>
> > >>> my usual usage pattern (i have a few variations on this, but this is a 
> > >>> simple example):
>
> > >>> def process_lots_of_rows():
> > >>>     from google.appengine.api import taskqueue
>
> > >>>     last_timestamp = request.vars.last_timestamp or 
> > >>> datetime.datetime(2010,1,1) #reasonable default for my app
> > >>>     limit = 100
> > >>>     #get records.  use >= so i don't miss any, don't use ID as they are 
> > >>> not assigned in strictly increasing fashion
> > >>>     rows = db(db.record.created_time >= 
> > >>> last_timestamp).select(orderby=db.end_user.timestamp,
> > >>>                                              limitby=(0,limit))
>
> > >>>     for r in rows:
> > >>>         r.update_record(bob='fred')
>
> > >>>     if len(rows) == limit:
> > >>>         #there are probably more to process
> > >>>         taskqueue.add(url=URL(r=request))
>
> > >>>     return dict(message="did some work")

Reply via email to