One problem I see is this: try: db io except Exception: ....
On exception you should explicitly rollback try: db io except Exception: db.rollback() I also do not know why you defined m_wind_table = db.Table(db, 'm_wind_10min', base_table, Field(...), ...) instead of m_wind_table = db.define_table('m_wind_10min', base_table, Field(...), ...) You do not want the table to be created? On Oct 18, 3:12 am, Manuele <manuele.pese...@gmail.com> wrote: > On 18/10/2011 00:23, Massimo Di Pierro wrote:> The code in this traceback has > nothing to do with postgresql but is > > related to reading data from the socket. > > What is the code that causes the problem? > > http://pastebin.com/yVJskGww > > here you can find the two function used. The second one reads the xls > file and the first one inserts records in database. > > http://pastebin.com/JhT4js50 > > and here you can find the table model > > Do you think it could be a problem related to the different systems > where web2py run? Moreover I can tell you that the system with MySql is > a ContOS with python-2.6 and it's a production server we use while the > other system is a laptop with debian, python-2.6 and postgres-8.4 I use > for development. > > Thank you very much > > Manuele