oops. Thanks for the fix. On Monday, 4 May 2015 10:56:36 UTC-5, michael.c.mccl...@gmail.com wrote: > > I've started using a list:string field on the auth_user model. > > I'm running web2py on GAE with the datastore. > > > I noticed web2py's admin tool started crashing on this page > appadmin/select/db?query=db.auth_user.id>0 > > > looking at the console I found: > > > /gluon/dal.py", line 10035, in <genexpr> > > return ', '.join(str(y) for y in x or []) > > UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position > 1: ordinal not in range(128) > > It seems web2py is not properly handling the datastore string list property. > > I fixed the problem by adding .encoding("utf8") to the dal.py function below: > > def list_represent(x, r=None): > #return ', '.join(str(y) for y in x or []) > return ', '.join(str(y.encode("utf8")) for y in x or []) > > > Has anybody else experienced the same error? > > > tks > >
-- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.