Wow, I certainly did something silly at some point -- in my source (gluon/html.py), url_encode is set to false:
I checked out a new version, and the build times match 100%, so it HAS to be my silliness (Version 1.99.7 (2012-03-04 22:12:08) stable). Apologies for the wild goose chase -- I seem to remember debugging some issue I was having with URLs from another app that linked to this one... anyway, I clearly was careless in that I modified the source and forgot to change it back. Thanks for your help. -Abe On Wednesday, August 1, 2012 10:23:11 AM UTC-5, AbrahamLinksys wrote: > > Hi, > > I have an appilcation that has been running for a while, and suddenly > today it gave an error on this line in my view: > > > [<a href="{{=URL(r=request,args=request.args,vars=dict(all=1)) }}">show > all attachements</a>] > > This worked fine, but then I think I upgraded from 1.99.4 to 1.99.7, and > it throws an error complaining that it cannot concatenate string and int > types (because of dict(all=1) instead of all='1') > > Of course, the error can be fixed by passing a string literal or calling > str() on the int, but i was curious if this intended? > > I haven't been very careful to only use string vars, assuming that my > laziness would be corrected by some gluonic magic. > > Am I supposed to have always been passing only strings as vars? Should I > be proactive and hunt down places in my code in other applications (which > are still using slightly older web2py versions) or is this something that > might change back to being able to use integers? > > Just curious. Here's the relevant part of the traceback: > > File "/usr/web2py-latest/gluon/html.py", line 330, in URL > other += '?%s' % '&'.join([var[0]+'='+var[1] for var in list_vars]) > TypeError: cannot concatenate 'str' and 'int' objects > > > If the "other+=" line were rewritten as such, would it be a bad thing for any > reason? > > other += '?%s' % '&'.join([*str(*var[0]*)*+'='+str(var[1]) for var in > list_vars]) > > > Thanks, > > Abe > > --