[SQLObject] "SQLCall instance" instead of actual values
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Justin A. <JA...@ua...> - 2004-11-23 16:21:10
|
I just reworked an app using sqlobject-0.6 to use a single connection to the backend, and to hand out objects converted to dictionaries using xmlrpc. This was mostly to enable caching on the db and to simplify a few things. but now, after the first few requests I start to get errors like: File "/tmp/sqlscanner/scandb.py", line 361, in scanasdict st=int(s.starttime) exceptions.AttributeError: SQLCall instance has no attribute '__int__' where that function is: def scanasdict(s): ... if s.starttime: st=int(s.starttime) else : st=0 ... scan={ "id": s.id, "ip": s.ip, ... "starttime": st, ... return scan and starttime is simply a DateTimeCol that can be NULL. What could be causing a SQLCall instance to be returned instead of a date, and how can I fix that? -- -- Justin Azoff -- Network Performance Analyst |