Hello guys, Recently updated from w2p 2.2.1 to 2.8.2 as I was advised; now random errors on database inserts started to raise for stuff that worked on the old version (2.2.1). Tracebacks of the two errors:
This is the most common one: File "/home/www-data/web2py/gluon/scheduler.py", line 238, in executor result = dumps(_function(*args, **vars)) File "applications/socialjack/modules/contactManager.py", line 97, in importSocialMediaContacts if db.contacts.insert(contact_name=contact_name, url=url, network=network, user_id=user_id, ring=4): File "/home/www-data/web2py/gluon/dal.py", line 9118, in insert ret = self._db._adapter.insert(self, self._listify(fields)) File "/home/www-data/web2py/gluon/dal.py", line 1347, in insert id = self.lastrowid(table) File "/home/www-data/web2py/gluon/dal.py", line 2724, in lastrowid return int(self.cursor.fetchone()[0]) TypeError: 'NoneType' object has no attribute '__getitem__' And I just noticed one more (more rare): File "/home/www-data/web2py/gluon/scheduler.py", line 238, in executor result = dumps(_function(*args, **vars)) File "applications/socialjack/modules/contactManager.py", line 97, in importSocialMediaContacts if not db((db.contacts.url == url) & (db.contacts.user_id == user_id)).select(): File "/home/www-data/web2py/gluon/dal.py", line 10471, in select return adapter.select(self.query,fields,attributes) File "/home/www-data/web2py/gluon/dal.py", line 1862, in select return self._select_aux(sql,fields,attributes) File "/home/www-data/web2py/gluon/dal.py", line 1843, in _select_aux return processor(rows,fields,self._colnames,cacheable=cacheable) File "/home/www-data/web2py/gluon/dal.py", line 2227, in parse value = row[j] IndexError: tuple index out of range These appear during long-running scheduler task that inserts records into a db table. The exact insert code is: if not db((db.contacts.url == url) & (db.contacts.user_id == user_id)).select(): if db.contacts.insert(contact_name=contact_name, url=url, network=network, user_id=user_id, ring=4): import_count += 1 Any suggestions why this happens? The app runs on an ubuntu 12.04 xen VM; w2p version: 2.8.2-stable+timestamp.2013.12.14.20.02.42 mysql-server version: 5.5.29-0ubuntu0.12.04.2 Any help is very much appreciated, thanks! Yassen -- 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.