So I solved this by dropping the table and creating it again. It had to do 
with the decimal points on the sizes.



On Monday, July 27, 2015 at 1:59:07 PM UTC-7, greenpoise wrote:
>
> Sorry for the delay. I was out of the office.
> Like I said, it works if I comment out the size1 and size2 fields. 
>
>
> This is the error I get:
>
> Traceback
>>
>> 1.
>> 2.
>> 3.
>> 4.
>> 5.
>> 6.
>> 7.
>> 8.
>> 9.
>> 10.
>> 11.
>> 12.
>> 13.
>> 14.
>> 15.
>> 16.
>> 17.
>> 18.
>> 19.
>> 20.
>> 21.
>> 22.
>> 23.
>> 24.
>>
>> Traceback (most recent call last):
>>   File "Applications/web2py/gluon/restricted.py", line 227, in restricted
>>     exec ccode in environment
>>   File 
>> "Applications/web2py/applications/MosaicCatalogBuilder/controllers/default.py"
>>  
>> <http://localhost:8000/admin/default/edit/MosaicCatalogBuilder/controllers/default.py>,
>>  line 144, in <module>
>>   File "Applications/web2py/gluon/globals.py", line 412, in <lambda>
>>     self._caller = lambda f: f()
>>   File 
>> "Applications/web2py/applications/MosaicCatalogBuilder/controllers/default.py"
>>  
>> <http://localhost:8000/admin/default/edit/MosaicCatalogBuilder/controllers/default.py>,
>>  line 72, in manageseries
>>     grid = SQLFORM.smartgrid(db[table],showbuttontext=False)
>>   File "Applications/web2py/gluon/sqlhtml.py", line 3027, in smartgrid
>>     user_signature=user_signature, **kwargs)
>>   File "Applications/web2py/gluon/sqlhtml.py", line 2279, in grid
>>     next=referrer)
>>   File "Applications/web2py/gluon/html.py", line 2301, in process
>>     self.validate(**kwargs)
>>   File "Applications/web2py/gluon/html.py", line 2238, in validate
>>     if self.accepts(**kwargs):
>>   File "Applications/web2py/gluon/sqlhtml.py", line 1686, in accepts
>>     self.id_field_name]).update(**fields)
>>   File "Applications/web2py/gluon/packages/dal/pydal/objects.py", line 2020, 
>> in update
>>     ret = db._adapter.update("%s" % table._tablename,self.query,fields)
>>   File "Applications/web2py/gluon/packages/dal/pydal/adapters/base.py", line 
>> 996, in update
>>     raise e
>> IntegrityError: FOREIGN KEY constraint failed
>>
>>
>
>
>
> On Friday, July 17, 2015 at 11:05:25 AM UTC-7, Dave S wrote:
>>
>>
>>
>> On Thursday, July 16, 2015 at 10:11:16 PM UTC-7, greenpoise wrote:
>>>
>>> Well, if I comment out the sizes, everything works. I have tried using 
>>> double as my field type. It doesn't work either. 
>>
>>
>> As Alex said, the error you posted is a Foreign Key exception ... a 
>> reference to another table has gone awry.
>>
>> If that's still the error being reported, then the size1 and size2 fields 
>> are red herrings.   If it is not the error being reported, please update 
>> with the current error message.
>>
>> /dps
>>
>>

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

Reply via email to