Hello Geert!
Sorry the long introduction, I'm newbie in mod_python and Draco.
(I'm intesively using Apache with PHP+Postgres and separetaly Python for standalone applications. I would like test Python's object oriented features in web applications.)
I've installed Draco on the following system:
Manrdake Linux 8.2
Python 2.2.2 (rpm)
egenix-mxBase 2.0.5 (from source)
Apache 1.3.23. (rpm)
mod_python-2.7.8 (source)
Postgresql 7.2 (rpm)
psycopg-1.1.6 (source)
draco-0.99.4 (source)
PROBLEM:
I've set up a virtual host in Apache and Draco database connection to PostgreSQL.
Then tried the first 'Hello World!' Draco example. (I've created __handler__.py, draco.ini, index.dsp as described in docs.)
When I'm open index.dsp first time in my Mozilla it displays the site. But when I refresh the site multiple times
I get an error message:
------------------------
Uncaught Exception
Exception: TypeError
Value: can't coerce DateTime to the other type
A traceback is provided below:
Traceback (most recent call last):
File "/usr/lib/python2.2/site-packages/draco/dracohandler.py", line 417, in _handler
reloadChild(mpreq)
File "/usr/lib/python2.2/site-packages/draco/dracohandler.py", line 236, in reloadChild
session.reload()
File "/usr/lib/python2.2/site-packages/draco/session.py", line 145, in reload
self.m_expires = DateTime(result[3])
File "/usr/lib/python2.2/site-packages/draco/date.py", line 312, in __init__
elif arg in (None, self._nullfmt):
------------------------
I've found the place of the error, but I cannot debug it. It seems in Apache or mod_python or Draco(?) there is a builtin cache that prevents me from make log messages.(Must I restart every time Apache to load the new Draco source?)
I've found a workaround to solve this problem:
date.py (312):
elif arg is None or arg is self._nullfmt:
Tried to replace 'is' to '==' but doesn't work.
Thanks in advance
Attila Szuts (aszuts@index.hu)