Hi Niphlod. You're right, there was something wrong in this field, I've 
delete it and create another one 'integer' and now it works fine. Thanks a 
lot.

Il giorno mercoledì 30 ottobre 2013 21:22:56 UTC+1, Niphlod ha scritto:
>
> has the cat_id field been a "string" before being a reference in a sqlite 
> database?
> If yes, you need to delete the column data and re-fill it.
>
>
> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Gotchas
>
> On Wednesday, October 30, 2013 4:55:50 PM UTC+1, Gael Princivalle wrote:
>>
>> Hi.
>>
>> I've got a strange error.
>>
>> My db:
>>     db.define_table('models',
>>         Field('code', unique=True),
>>         Field('category'),
>>         Field('cat_id', 'reference categories'),
>>         Field('description_en'),
>>         Field('description_it'),
>>         Field('pdf_path'))
>>     db.define_table('images',
>>         Field('title_en'),
>>         Field('title_it'),
>>         Field('contents'),
>>         Field('image_file', 'upload'),
>>         Field('image_file_s', 'upload'))
>>
>> When I do a beautify on the "images" table in the same view, it works.
>> With the "models table", I've got this error:
>> invalid literal for long() with base 10: 'ie'
>>
>> My controller:
>> def hp():
>>     models=db().select(db.models.ALL)
>>     return dict(models=models)
>>
>> My view:
>> {{=BEAUTIFY(response._vars)}}
>>
>> I use this "models" table also with a Grid and it works.
>>
>> What's wrong ?
>>
>

-- 
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.

Reply via email to