[Zope] dtml-sendmail integer required?

Davis Marques davis@mccalldesign.com
Wed, 12 Feb 2003 13:40:23 -0800


This is a multi-part message in MIME format.

------=_NextPart_000_0001_01C2D29C.4B825900
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

I just upgraded my Zope from 2.5.1 to 2.6.0 and started receiving this
error message from some dtml-sendmail code:

Error Type: TypeError
Error Value: an integer is required

No traceback is given.  Here's my original DTML-METHOD

 

<dtml-sendmail mailhost="Mailhost">

To:<dtml-var To>

From:<dtml-var From>

Date:<dtml-var "_.DateTime()">

Subject:<dtml-var Subject>

<dtml-var Message>

</dtml-sendmail>

 

I toyed with it for a few hours and the only thing I could conclude was
that it doesn't like the Date value (it wants an int, as you can see
above), and if I remove the Date field (which isn't required anyway (or
is it now?) ) I'm left with the following error message:

 

Error Type: NameError
Error Value: global name 'localzone' is not defined

 

I've tried to find the DTML-Sendmail code in the python libraries to see
if I could figure out what it wants, but haven't found it yet.  Can
anyone toss me a clue as to the possible cure/cause for this?

 

D


------=_NextPart_000_0001_01C2D29C.4B825900
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html>

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">


<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">

<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
p
	{margin-right:0in;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Times New Roman";}
span.EmailStyle17
	{font-family:Arial;
	color:windowtext;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I just upgraded my Zope from 2.5.1 to 2.6.0 and =
started
receiving this error message from some dtml-sendmail =
code:</span></font></p>

<p><strong><b><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt'>Error
Type: TypeError</span></font></b></strong><br>
<strong><b><font face=3D"Times New Roman">Error Value: an integer is =
required</font></b></strong></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>No traceback is given.&nbsp; Here&#8217;s my original
DTML-METHOD</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&lt;dtml-sendmail =
mailhost=3D&quot;Mailhost&quot;&gt;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>To:&lt;dtml-var To&gt;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>From:&lt;dtml-var From&gt;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Date:&lt;dtml-var =
&#8220;_.DateTime()&#8221;&gt;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Subject:&lt;dtml-var Subject&gt;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&lt;dtml-var Message&gt;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&lt;/dtml-sendmail&gt;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I toyed with it for a few hours and the only thing I =
could conclude
was that it doesn&#8217;t like the Date value (it wants an int, as you =
can see
above), and if I remove the Date field (which isn&#8217;t required =
anyway (or
is it now?) ) I&#8217;m left with the following error =
message:</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><strong><b><font size=3D1 face=3DArial><span =
style=3D'font-size:
9.0pt;font-family:Arial'>Error Type: =
NameError</span></font></b></strong><font
size=3D1 face=3DArial><span =
style=3D'font-size:9.0pt;font-family:Arial'><br>
<strong><b><font face=3DArial><span style=3D'font-family:Arial'>Error =
Value: global
name 'localzone' is not =
defined</span></font></b></strong></span></font></p>

<p class=3DMsoNormal><strong><b><font size=3D1 face=3DArial><span =
style=3D'font-size:
9.0pt;font-family:Arial'>&nbsp;</span></font></b></strong></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>I&#8217;ve tried to find the DTML-Sendmail code in =
the python
libraries to see if I could figure out what it wants, but haven&#8217;t =
found
it yet.&nbsp; Can anyone toss me a clue as to the possible cure/cause =
for this?</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>D</span></font></p>

</div>

</body>

</html>

------=_NextPart_000_0001_01C2D29C.4B825900--