On 12 October 2011 15:31, Massimo Di Pierro <massimo.dipie...@gmail.com>wrote:
> How long is the list of sids? Slite? This is not a web2py error but > most likely a driver error. Try commit after every every update. > > Thanks for your reply Massimo. The list is normally not long - between 1 and 5 most of the times although in some cases it can be up to 100. But I think I have discovered what caused the error. The some tables involved have unique constraints for a combination of two fields. I have tried to navigate this with try... except but now it seems that DAL or psycopg give up when the database complains about an effort to insert a duplicate entry. Now I use a workaround (which take up a lot more resources) to first check in the database for that combination before trying to insert it. Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we need for life and godliness through the full knowledge of the one who called us by his own glory and excellence. 2 Pet. 1:2b,3a