Hi Oleg,
The exception is:
Traceback (most recent call last):
File "teste.py", line 17, in ?
datetime=datetime.datetime(2006, 10, 25, 9, 0)
File
"/usr/lib/python2.4/site-packages/SQLObject-0.7.1-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.1-py2.4.egg/sqlobject/main.py",
line 1200, in __init__
self._create(id, **kw)
File
"/usr/lib/python2.4/site-packages/SQLObject-0.7.1-py2.4.egg/sqlobject/main.py",
line 1227, in _create
self._SO_finishCreate(id)
File
"/usr/lib/python2.4/site-packages/SQLObject-0.7.1-py2.4.egg/sqlobject/main.py",
line 1254, in _SO_finishCreate
self._init(id)
File
"/usr/lib/python2.4/site-packages/SQLObject-0.7.1-py2.4.egg/sqlobject/main.py",
line 960, in _init
self._SO_selectInit(selectResults)
File
"/usr/lib/python2.4/site-packages/SQLObject-0.7.1-py2.4.egg/sqlobject/main.py",
line 1152, in _SO_selectInit
colValue = col.to_python(colValue, self._SO_validatorState)
File
"/usr/lib/python2.4/site-packages/SQLObject-0.7.1-py2.4.egg/sqlobject/col.py",
line 1111, in to_python
value = super(TimeValidator, self).to_python(value, state)
File
"/usr/lib/python2.4/site-packages/SQLObject-0.7.1-py2.4.egg/sqlobject/col.py",
line 948, in to_python
(self.format, self.name, type(value), value), value, state)
formencode.api.Invalid: expected an date/time string of the '%H:%M:%S'
format in the DateTimeCol 'time', got <type 'datetime.timedelta'>
datetime.timedelta(0, 32400) instead
I trying to find myself the error, it seems that the value returned by
_SO_selectResults in the _init method of SQLObject class (line 959) is
a datetime.timedelta object when the column is TimeCol, the
TimeValidator expects a datetime.time or datetime.datetime object...
There is no problem with date object or datetime object. I am going to
university now, but I can see if I can fix this problem and send a
diff tomorrow.
Thanks for the attention!
--
Michel Thadeu Sabchuk
Curitiba - Brasil
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss