[Zope] Date Time Problem

zope zope@stylusinc.net
Fri, 16 Aug 2002 09:16:08 +0530


This is a multi-part message in MIME format.

------=_NextPart_000_0015_01C24505.8E3A3E90
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi

I have been working using Pagetemplates,XML,python script and Postgres =
sql
At times when I use a select statement to select values from a table in =
zope I get an error on the time variable.

The error is :
Error, Invalid Date-Time String: 2002-06-08=20
00:00:00+05=20
SQL used:=20
select * from calendar order by cuser=20
Traceback (innermost last):=20
File=20
/home/zope/Zope-2.5.1/lib/python/ZPublisher/Publish.py,=20
line 150, in publish_module=20
File=20
/home/zope/Zope-2.5.1/lib/python/ZPublisher/Publish.py,=20
line 114, in publish=20
File /home/zope/Zope-2.5.1/lib/python/Zope/__init__.py,=20
line 159, in zpublisher_exception_hook=20
(Object: zsqll_event)=20
File=20
/home/zope/Zope-2.5.1/lib/python/ZPublisher/Publish.py,=20
line 98, in publish=20
File=20
/home/zope/Zope-2.5.1/lib/python/ZPublisher/mapply.py,=20
line 88, in mapply=20
(Object: manage_test)=20
File=20
/home/zope/Zope-2.5.1/lib/python/ZPublisher/Publish.py,=20
line 39, in call_object=20
(Object: manage_test)=20
File=20
/home/zope/Zope-2.5.1/lib/python/Shared/DC/ZRDB/DA.py,=20
line 328, in manage_test=20
(Object: zsqll_event)=20
File=20
/home/zope/Zope-2.5.1/lib/python/Shared/DC/ZRDB/DA.py,=20
line 306, in manage_test=20
(Object: zsqll_event)=20
File=20
/home/zope/Zope-2.5.1/lib/python/Shared/DC/ZRDB/DA.py,=20
line 421, in __call__=20
(Object: zsqll_event)=20
File=20
/home/zope/Zope-2.5.1/lib/python/Products/ZPsycopgDA/db.py,=20
line 205, in query=20
File=20
/home/zope/Zope-2.5.1/lib/python/Products/ZPsycopgDA/DA.py,=20
line 120, in cast_DateTime=20
File=20
/home/zope/Zope-2.5.1/lib/python/DateTime/DateTime.py,=20
line 651, in __init__=20
File=20
/home/zope/Zope-2.5.1/lib/python/DateTime/DateTime.py,=20
line 1022, in _parse=20
Invalid Date-Time String: (see above)=20
=20
But at other times there is no error thrown .I rectify the error usually =
by checking the properties of the Database connection and saving the =
settings  again.The error does nopt appear always only at times
Couls you please tell me how I can avoid this error from creeping =
up.Because  I have found that at some time or the other this error comes =
up and so far I have not been able to find a solution.

Best Regards
John Kunchandy
=20

------=_NextPart_000_0015_01C24505.8E3A3E90
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have been working using =
Pagetemplates,XML,python=20
script and Postgres sql</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>At times when&nbsp;I use a select =
statement to=20
select values from a table&nbsp;in zope&nbsp;I get an error on the time=20
variable.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The error is :</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Error, Invalid Date-Time String: =
2002-06-08=20
<BR>00:00:00+05 <BR>SQL used: <BR>select * from calendar order by cuser=20
<BR>Traceback (innermost last): <BR>File=20
<BR>/home/zope/Zope-2.5.1/lib/python/ZPublisher/Publish.py, <BR>line =
150, in=20
publish_module <BR>File=20
<BR>/home/zope/Zope-2.5.1/lib/python/ZPublisher/Publish.py, <BR>line =
114, in=20
publish <BR>File /home/zope/Zope-2.5.1/lib/python/Zope/__init__.py, =
<BR>line=20
159, in zpublisher_exception_hook <BR>(Object: zsqll_event) <BR>File=20
<BR>/home/zope/Zope-2.5.1/lib/python/ZPublisher/Publish.py, <BR>line 98, =
in=20
publish <BR>File =
<BR>/home/zope/Zope-2.5.1/lib/python/ZPublisher/mapply.py,=20
<BR>line 88, in mapply <BR>(Object: manage_test) <BR>File=20
<BR>/home/zope/Zope-2.5.1/lib/python/ZPublisher/Publish.py, <BR>line 39, =
in=20
call_object <BR>(Object: manage_test) <BR>File=20
<BR>/home/zope/Zope-2.5.1/lib/python/Shared/DC/ZRDB/DA.py, <BR>line 328, =
in=20
manage_test <BR>(Object: zsqll_event) <BR>File=20
<BR>/home/zope/Zope-2.5.1/lib/python/Shared/DC/ZRDB/DA.py, <BR>line 306, =
in=20
manage_test <BR>(Object: zsqll_event) <BR>File=20
<BR>/home/zope/Zope-2.5.1/lib/python/Shared/DC/ZRDB/DA.py, <BR>line 421, =
in=20
__call__ <BR>(Object: zsqll_event) <BR>File=20
<BR>/home/zope/Zope-2.5.1/lib/python/Products/ZPsycopgDA/db.py, <BR>line =
205, in=20
query <BR>File =
<BR>/home/zope/Zope-2.5.1/lib/python/Products/ZPsycopgDA/DA.py,=20
<BR>line 120, in cast_DateTime <BR>File=20
<BR>/home/zope/Zope-2.5.1/lib/python/DateTime/DateTime.py, <BR>line 651, =
in=20
__init__ <BR>File =
<BR>/home/zope/Zope-2.5.1/lib/python/DateTime/DateTime.py,=20
<BR>line 1022, in _parse <BR>Invalid Date-Time String: (see=20
above)&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>But at other times there is no error =
thrown .I=20
rectify the error usually by checking the properties of the Database =
connection=20
and saving the settings&nbsp; again.The error does nopt appear always =
only at=20
times</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Couls you please tell me how&nbsp;I can =
avoid this=20
error from creeping up.Because&nbsp; I have found that at some time or =
the other=20
this error comes up and so far I have not been able to find a=20
solution.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Best Regards</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>John Kunchandy</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0015_01C24505.8E3A3E90--