did you by any chance moved from 'string' to 'decimal(5,2)' AFTER creating the table on sqlite ? sqlite can't alter the type of the column if data is already there..... try recreating the table from scratch.
On Saturday, October 26, 2013 12:48:01 AM UTC+2, Carlos Zenteno wrote: > > This is my table: > > db.define_table('tenants_extra', > Field('tenant', 'reference tenants'), > Field('address', 'reference addresses'), > Field('tenant_type', type = 'string', length = 32, default = > T('Condo'), required = True, label = T('Type'), comment = T('Type of your > organization'), notnull = True), > Field('logo', type = 'upload', label = T('Logo'), comment = 'Logo file > (jpg or png) - 200x200', notnull = True), > Field('legal_name', type = 'string', length = 64, label = T('Legal > Name'), comment = T('Legal name of your organization'), notnull = True), > Field('tax_id', type = 'string', length = 13, default = '', label = > T('Tax ID'), comment = T('Tax ID of your organization'), notnull = True), > Field('latitude', type = 'decimal(5,2)', label = T('Latitude'), > comment = T('Latitude for mapping location'), notnull = True), > Field('longitude', type = 'decimal(5,2)', label = T('Longitude'), > comment = T('Longitude for mapping location'), notnull = True) > ) > > All works fine, can insert records OK > BUT when trying to view the records via "appadmin" it gives me the > following error: > > Traceback (most recent call last): > File "C:\Documents and > Settings\x\Desktop\y\Web2py\web2py\applications\ts\controllers/appadmin.py", > line 252, in select > File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 10111, in > select > File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 2304, in select > File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 1751, in select > File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 1732, in > _select_aux > File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 2106, in parse > File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 1955, in > parse_value > File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 2015, in > parse_decimal > TypeError: float argument required, not str > > > This is the query: > db.tenants_extra.id>0 > > I guess that the problem has to be with using the 'decimal' type... > but I dont know, I am new to web2py... > -- 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/groups/opt_out.