Lino Website

Fixed bugs

tests/19.py works

Tuesday, 13. February 2007 19:08.

A severe bug due to Integrating PyQt into Lino (18.01.07) which occured most clearly in tests/19.py took me some time. The reason was that qtconn.Connection.sql2value() returned a QString object instead of UnicodeString.

ERROR: test01 (19.Case)
———————————————————————-
Traceback (most recent call last):
  File "19.py", line 109, in test01
    eupen = sess.query(City).appendRow(nation=be,name="Eupen")
  File "c:\lino\trunk\src\lino\adamo\query.py", line 957, in appendRow
    row.unlock()
  File "c:\lino\trunk\src\lino\adamo\row.py", line 370, in unlock
    self.commit(unlock=True)
  File "c:\lino\trunk\src\lino\adamo\row.py", line 386, in commit
    self._store.setAutoRowId(self)
  File "c:\lino\trunk\src\lino\adamo\store.py", line 315, in setAutoRowId
    self._table,front)
  File "c:\lino\trunk\src\lino\adamo\qtconn.py", line 248, in executeGetLastId
    l.append("%s = %s" % (n,self.value2sql(knownId,t)))
  File "c:\lino\trunk\src\lino\adamo\sql.py", line 151, in value2sql
    raise TypeError, repr(val)
TypeError: 

Copyright 2001-2007 Luc Saffre.
http://lino.saffre-rumma.ee
Generated 2007-06-07 16:22:55