The problem is not so much with this code but with the fact that there seems to be non-unicode characters in one of your records. It comes up because of the fields in the SQLFORM as an IS_IN_DB validator.
I have made a modification in trunk that will allow you hopefully to get the data out of the database anyway. You should try find out what field and record that is and correct it anyway. Massimo On Jan 12, 10:00 am, Jose <jjac...@gmail.com> wrote: > The database server is MS-SQLServer > > The following was working (is a simplification): > > def test(): > form = SQLFORM(db.DomiciliosSolicitud) > return dict(form=form) > > in any of the updates stopped working. I do not know how long, because > that portion is used infrequently. Now we are migrating the server and > test that everything works well I found the error. > > The error is as follows: > > Traceback (most recent call last): > File "/var/web2py/gluon/restricted.py", line 173, in restricted > exec ccode in environment > File "/var/web2py/applications/autogestion/controllers/ > solicitud.py", line 167, in <module> > File "/var/web2py/gluon/globals.py", line 96, in <lambda> > self._caller = lambda f: f() > File "/var/web2py/applications/autogestion/controllers/ > solicitud.py", line 31, in prueba > form = SQLFORM(db.DomiciliosSolicitud) > File "/var/web2py/gluon/sqlhtml.py", line 618, in __init__ > inp = self.widgets.options.widget(field, default) > File "/var/web2py/gluon/sqlhtml.py", line 194, in widget > options = requires0.options() > File "/var/web2py/gluon/validators.py", line 359, in options > self.build_set() > File "/var/web2py/gluon/validators.py", line 343, in build_set > records = self.dbset.select(*self.fields, **dd) > File "/var/web2py/gluon/sql.py", line 3018, in select > return self.parse(db,rows,self.colnames) > File "/var/web2py/gluon/sql.py", line 3040, in parse > value = value.decode(db._db_codec) > File "/usr/local/lib/python2.6/encodings/utf_8.py", line 16, in > decode > return codecs.utf_8_decode(input, errors, True) > UnicodeDecodeError: 'utf8' codec can't decode byte 0xbf in position 0: > unexpected code byte > > Jose
-- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.