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 <[email protected]> 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 <[email protected]> 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 <[email protected]> wrote:
> >> thanks howesc
>
> >> On 11 Mar 2011, at 23:29, howesc <[email protected]> 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