>   Can we see the entire traceback? A short test program?
>  
>
sure,
I'm using sqlobject through turbogear, here is a sample code:

--------
class nodeProperties(SQLObject):
    class sqlmeta:
        fromDatabase = True
        table = "nodeProperties"
        style = MixedCaseStyle()


np = nodeProperties( hostname="faro" )
----------

and the traceback :


-----------

File "/home/sed/visconte/projects/pipol/oar-tools/tgoar/tgoar/controllers.py", 
line 20, in index
    host = nodeProperties(hostname="faro")
  File 
"/usr/lib/python2.4/site-packages/SQLObject-0.7.2a_r2082-py2.4.egg/sqlobject/declarative.py",
 line 93, in _wrapper
    return fn(self, *args, **kwargs)
  File 
"/usr/lib/python2.4/site-packages/SQLObject-0.7.2a_r2082-py2.4.egg/sqlobject/main.py",
 line 1203, in __init__
    self._create(id, **kw)
  File 
"/usr/lib/python2.4/site-packages/SQLObject-0.7.2a_r2082-py2.4.egg/sqlobject/main.py",
 line 1227, in _create
    self.set(**kw)
  File 
"/usr/lib/python2.4/site-packages/SQLObject-0.7.2a_r2082-py2.4.egg/sqlobject/main.py",
 line 1086, in set
    kw[name] = dbValue = from_python(value, self._SO_validatorState)
  File 
"/usr/lib/python2.4/site-packages/SQLObject-0.7.2a_r2082-py2.4.egg/sqlobject/col.py",
 line 966, in from_python
    (self.name, type(value), value), value, state)
Invalid: expected a datetime in the DateTimeCol 'expiryDate', got <type 'str'> 
'1000-01-01 00:00:00' instead

----------

and the content of my table:


----------
mysql> select * from nodeProperties;
+-------------+------------+--------+---------------------+------------------+------+--------+--------------+
| hostname    | besteffort | deploy | expiryDate          | 
desktopComputing | arch | os     | distribution |
+-------------+------------+--------+---------------------+------------------+------+--------+--------------+
| 192.168.0.1 | YES        | NO     | 1000-01-01 00:00:00 | 
NO               | i386 | NetBSD | 3_0_1        |
| faro        | YES        | NO     | 1000-01-01 00:00:00 | 
NO               | NULL | NULL   | NULL         |
+-------------+------------+--------+---------------------+------------------+------+--------+--------------+
2 rows in set (0.00 sec)

--------------

Best regards,
François


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to