Good day sir It works for me if i change in web2py/gluon/contrib/gql.py
L617 def __str__(self): return ' AND '.join([str(filter) for filter in self.filters]) for def __str__(self): return ' AND '.join([unicode(filter) for filter in self.filters]) Maybe that is not the right solution, but it could help to fix it On Sat, Sep 25, 2010 at 10:55 AM, Napoleon Moreno <napoleo...@gmail.com>wrote: > I tried it > > It works well in sqllite > > In gae returns a ticket: > > Traceback (most recent call last): > File "/home/napoleon/triviaapp/web2py/gluon/restricted.py", line 188, in > restricted > exec ccode in environment > File > "/home/napoleon/triviaapp/web2py/applications/welcome/controllers/default.py:category", > line 266, in <module> > File "/home/napoleon/triviaapp/web2py/gluon/globals.py", line 96, in > <lambda> > self._caller = lambda f: f() > File > "/home/napoleon/triviaapp/web2py/applications/welcome/controllers/default.py:category", > line 57, in category > File "/home/napoleon/triviaapp/web2py/gluon/tools.py", line 2837, in > create > deletable=False, > File "/home/napoleon/triviaapp/web2py/gluon/tools.py", line 2780, in > update > hideerror=self.settings.hideerror): > File "/home/napoleon/triviaapp/web2py/gluon/sqlhtml.py", line 952, in > accepts > hideerror=hideerror, > File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 1542, in > accepts > status = self._traverse(status,hideerror) > File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 552, in > _traverse > newstatus = c._traverse(status,hideerror) and newstatus > File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 552, in > _traverse > newstatus = c._traverse(status,hideerror) and newstatus > File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 552, in > _traverse > newstatus = c._traverse(status,hideerror) and newstatus > File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 552, in > _traverse > newstatus = c._traverse(status,hideerror) and newstatus > File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 559, in > _traverse > newstatus = self._validate() > File "/home/napoleon/triviaapp/web2py/gluon/html.py", line 1330, in > _validate > (value, errors) = validator(value) > File "/home/napoleon/triviaapp/web2py/gluon/validators.py", line 493, in > __call__ > rows = self.dbset(field == value).select(limitby=(0, 1)) > File "/home/napoleon/triviaapp/web2py/gluon/contrib/gql.py", line 737, in > select > self._db['_lastsql'] = 'SELECT WHERE %s' % self.where > File "/home/napoleon/triviaapp/web2py/gluon/contrib/gql.py", line 615, in > __str__ > > return ' AND '.join([str(filter) for filter in self.filters]) > UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-10: > ordinal not in range(128) > > > INFO 2010-09-25 15:47:49,038 gaehandler.py:65] **** Request: > 49.73ms/50.00ms (real time/cpu time) > INFO 2010-09-25 15:47:49,043 recording.py:327] Saved; key: > __appstats__:068900, part: 121 bytes, full: 15295 bytes, overhead: 0.001 + > 0.006; link: http://localhost:8080/stats/details?time=1285429668988 > INFO 2010-09-25 15:47:49,049 dev_appserver.py:3275] "POST > /welcome/default/category HTTP/1.1" 500 - > INFO 2010-09-25 15:47:49,097 gaehandler.py:65] **** Request: > 0.60ms/0.00ms (real time/cpu time) > INFO 2010-09-25 15:47:49,098 recording.py:327] Saved; key: > __appstats__:069000, part: 31 bytes, full: 1052 bytes, overhead: 0.000 + > 0.001; link: http://localhost:8080/stats/details?time=1285429669097 > INFO 2010-09-25 15:47:49,105 dev_appserver.py:3275] "GET /favicon.ico > HTTP/1.1" 400 - > > > > On Sat, Sep 25, 2010 at 10:16 AM, mdipierro <mdipie...@cs.depaul.edu>wrote: > >> can you help us debug? Try >> >> >> db.category.name.requires = IS_NOT_IN_DB(db, 'category.name') >> >> On Sep 25, 8:37 am, Napoleon Moreno <napoleo...@gmail.com> wrote: >> > Good day >> > >> > My dal was: >> > >> > db.define_table('category', >> > Field('name','string'), >> > format='%(name)s' >> > ) >> > >> > db.category.name.requires = IS_NOT_IN_DB(db, db.category.name) >> > >> > The error ocurrs in db.category.name.requires = IS_NOT_IN_DB(db, >> > db.category.name). >> > >> > I removed this for the moment. >> > >> > Thanks for any advice. >> > >> > On Thu, Sep 23, 2010 at 9:38 PM, Napoleon Moreno <napoleo...@gmail.com >> >wrote: >> > >> > > Good night >> > >> > > i have a simple form to input data in hebrew >> > >> > > I works ok in in sqlLite. >> > >> > > in GAE it returns: >> > >> > > return ' AND '.join([str(filter) for filter in self.filters]) >> > > UnicodeEncodeError: 'ascii' codec can't encode characters in position >> 7-11: >> > > ordinal not in range(128) >> > >> > > db.define_table('category', >> > > Field('name','string'), >> > > format='%(name)s' >> > > ) >> > >> > > this is the form: >> > >> > > form = crud.create(db.category, next=URL('category'), >> > > message=T("record created")) >> > > categories = crud.select(db.category, fields=['name'], >> > > headers={'category.name': 'Name'}) >> > > return dict(form=form, categories=categories) >> > >> > >> > >