UnicodeDecodeError
Werner Fleck <[email protected]>
| Newsgroups | gmane.mail.spam.tmda.user |
|---|---|
| Message-ID | <[email protected]> |
Today I've got a UnicodeDecodeError error while using tmda.cgi. I have attached the complete error message and the email which caused the error. Regards Werner
tmda-cgi Program Error.htm
(text/html, 12 KB)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><!-- THIS PAGE IS AUTOMATICALLY GENERATED. DO NOT EDIT. --><!-- Wed Apr 7 13:28:51 2004 --><!-- USING HT2HTML 2.1 --><!-- SEE http://ht2html.sf.net --><!-- User-specified headers:
Title: tmda-cgi Program Error
--><title>tmda-cgi Program Error</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="HT2HTML/2.1">
<link rel="STYLESHEET" href="tmda-cgi%20Program%20Error-Dateien/styles.css" type="text/css"></head><body onload="Preloader()" alink="#ff0000" bgcolor="#a6a6b3" link="#0000bb" text="#000000" vlink="#551a8b">
<!-- start of page table -->
<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
<!-- start of banner row -->
<tbody><tr>
<!-- start of corner cells -->
<td class="corner" align="right" bgcolor="#76b2f6" valign="bottom"><img src="tmda-cgi%20Program%20Error-Dateien/corner.png" alt="[Lighthouse]"></td>
<!-- end of corner cells -->
<!-- start of banner -->
<td class="banner" bgcolor="#76b2f6" height="135" valign="bottom"><map name="bannerMap" id="bannerMap"><area href="http://tmda.net/" shape="RECT" coords="328,111,456,134" title="http://tmda.net">
</map><img src="tmda-cgi%20Program%20Error-Dateien/banner.png" usemap="#bannerMap" border="0" height="135" width="457"></td><!-- end of banner -->
</tr><!-- end of banner row -->
<tr><!-- start of sidebar/body row -->
<!-- start of sidebar cells -->
<td class="sidebar" bgcolor="#000000" valign="top" width="130">
<!-- start of sidebar table -->
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr><td class="sidebar"><a href="http://zarquon.flexoft.net/cgi-bin/tmda.cgi?cmd=gen_addr&SID=lmfXZqZy" class="sidebarMainLinkMedium">Addresses</a></td></tr>
<tr><td class="sidebar"><a href="http://zarquon.flexoft.net/cgi-bin/tmda.cgi?cmd=pending&SID=lmfXZqZy" class="sidebarMainLinkMedium">Pending</a></td></tr>
<tr><td class="sidebar"><a href="http://zarquon.flexoft.net/cgi-bin/tmda.cgi?cmd=incoming&SID=lmfXZqZy" class="sidebarMainLinkMedium">Filters</a></td></tr>
<tr><td class="sidebar"><a href="http://zarquon.flexoft.net/cgi-bin/tmda.cgi?cmd=editlist&SID=lmfXZqZy" class="sidebarMainLinkMedium">Lists</a></td></tr>
<tr><td class="sidebar"><a href="http://zarquon.flexoft.net/cgi-bin/tmda.cgi?cmd=theme&SID=lmfXZqZy" class="sidebarMainLinkMedium">Settings</a></td></tr>
<tr><td class="sidebar"><a href="http://zarquon.flexoft.net/cgi-bin/tmda.cgi?cmd=info&SID=lmfXZqZy" class="sidebarMainLinkMedium">Info</a></td></tr>
<tr><td class="sidebar"><a href="http://zarquon.flexoft.net/cgi-bin/tmda.cgi?cmd=logout&SID=lmfXZqZy" class="sidebarMainLinkMedium">Logout</a></td></tr>
</tbody></table><!-- end of sidebar table -->
</td>
<!-- end of sidebar cell -->
<!-- start of body cell -->
<td class="body" valign="top"><table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
<tbody><tr><td class="banner2" align="left" bgcolor="#000000" height="20"><img src="tmda-cgi%20Program%20Error-Dateien/banner2.png"></td></tr>
<tr><td class="mainContent" valign="top">
<table summary="heading" border="0" cellpadding="2" cellspacing="0" width="100%">
<tbody><tr bgcolor="#000000">
<td valign="bottom"> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>UnicodeDecodeError</strong></big></big></font></td><td align="right" valign="bottom"><font color="#ffffff" face="helvetica, arial">Python 2.3.5: /usr/bin/python<br>Sat Nov 11 23:13:59 2006</font></td></tr></tbody></table>
<p>A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.</p><p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr><td bgcolor="#c1cedd"><big> </big><a href="file:///home/wf/tmda-cgi-0.15/tmda-cgi.py">/home/wf/tmda-cgi-0.15/tmda-cgi.py</a> </td></tr>
<tr><td><font color="#000000"><tt><small> 188</small> elif Cmd == "pending":<br>
</tt></font></td></tr>
<tr><td><font color="#000000"><tt><small> 189</small> import PendList<br>
</tt></font></td></tr>
<tr><td bgcolor="#76b2f6"><tt><small> 190</small> Call(PendList)<br>
</tt></td></tr>
<tr><td><font color="#000000"><tt><small> 191</small> elif Cmd == "restore":<br>
</tt></font></td></tr>
<tr><td><font color="#000000"><tt><small> 192</small> pass<br>
</tt></font></td></tr>
<tr><td><small><font color="#000000"><strong>Call</strong> = <function Call>, <strong>PendList</strong> = <module 'PendList' from '/home/wf/tmda-cgi-0.15/PendList.pyc'></font></small></td></tr></tbody></table></p><p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr><td bgcolor="#c1cedd"><big> </big><a href="file:///home/wf/tmda-cgi-0.15/tmda-cgi.py">/home/wf/tmda-cgi-0.15/tmda-cgi.py</a> in <strong>Call</strong>(Library=<module 'PendList' from '/home/wf/tmda-cgi-0.15/PendList.pyc'>, Str=None)</td></tr>
<tr><td><font color="#000000"><tt><small> 86</small> Library.Show(Str)<br>
</tt></font></td></tr>
<tr><td><font color="#000000"><tt><small> 87</small> else:<br>
</tt></font></td></tr>
<tr><td bgcolor="#76b2f6"><tt><small> 88</small> Library.Show()<br>
</tt></td></tr>
<tr><td><font color="#000000"><tt><small> 89</small> <br>
</tt></font></td></tr>
<tr><td><font color="#000000"><tt><small> 90</small> # Capture WebUID<br>
</tt></font></td></tr>
<tr><td><small><font color="#000000"><strong>Library</strong> = <module 'PendList' from '/home/wf/tmda-cgi-0.15/PendList.pyc'>, Library.<strong>Show</strong> = <function Show></font></small></td></tr></tbody></table></p><p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr><td bgcolor="#c1cedd"><big> </big><a href="file:///home/wf/tmda-cgi-0.15/PendList.py">/home/wf/tmda-cgi-0.15/PendList.py</a> in <strong>Show</strong>()</td></tr>
<tr><td><font color="#000000"><tt><small> 505</small> value += Unicode.TranslateToUTF8(decoded[1], decoded[0], "strict")<br>
</tt></font></td></tr>
<tr><td><font color="#000000"><tt><small> 506</small> except UnicodeError:<br>
</tt></font></td></tr>
<tr><td bgcolor="#76b2f6"><tt><small> 507</small> value += Unicode.TranslateToUTF8(CharSet, decoded[0], "ignore")<br>
</tt></td></tr>
<tr><td><font color="#000000"><tt><small> 508</small> else:<br>
</tt></font></td></tr>
<tr><td><font color="#000000"><tt><small> 509</small> value += Unicode.TranslateToUTF8(CharSet, decoded[0], "ignore")<br>
</tt></font></td></tr>
<tr><td><small><font color="#000000"><strong>value</strong> = '', <em>global</em> <strong>Unicode</strong> = <module 'Unicode' from '/home/wf/tmda-cgi-0.15/Unicode.pyc'>, Unicode.<strong>TranslateToUTF8</strong> = <function TranslateToUTF8>, <strong>CharSet</strong> = 'iso-8859-8-i', <strong>decoded</strong> = ('<font color="#c040c0">\xec\xee\xe3</font> <font color="#c040c0">\xe1\xf2\xf6\xee\xea</font> <font color="#c040c0">\xec\xe3\xe1\xf8</font> <font color="#c040c0">\xf2\xf8\xe1\xe9\xfa</font>', 'iso-8859-8-i')</font></small></td></tr></tbody></table></p><p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr><td bgcolor="#c1cedd"><big> </big><a href="file:///home/wf/tmda-cgi-0.15/Unicode.py">/home/wf/tmda-cgi-0.15/Unicode.py</a> in <strong>TranslateToUTF8</strong>(CharSet=u'iso-8859-8-i', Str='<font color="#c040c0">\xec\xee\xe3</font> <font color="#c040c0">\xe1\xf2\xf6\xee\xea</font> <font color="#c040c0">\xec\xe3\xe1\xf8</font> <font color="#c040c0">\xf2\xf8\xe1\xe9\xfa</font>', Errors='ignore')</td></tr>
<tr><td><font color="#000000"><tt><small> 102</small> # Mark it and use the fallback<br>
</tt></font></td></tr>
<tr><td><font color="#000000"><tt><small> 103</small> else:<br>
</tt></font></td></tr>
<tr><td bgcolor="#76b2f6"><tt><small> 104</small> return "(%s) %s" % (CharSet,<br>
</tt></td></tr>
<tr><td bgcolor="#76b2f6"><tt><small> 105</small> TranslateToUTF8(PVars[("General", "CSEncoding")], Str, Errors))<br>
</tt></td></tr>
<tr><td><font color="#000000"><tt><small> 106</small> Decoder = Lib.Codec().decode<br>
</tt></font></td></tr>
<tr><td><small><font color="#000000"><strong>CharSet</strong> = u'iso-8859-8-i', <em>global</em> <strong>TranslateToUTF8</strong> = <function TranslateToUTF8>, <em>global</em> <strong>PVars</strong> = <Session.Session instance>, <strong>Str</strong> = '<font color="#c040c0">\xec\xee\xe3</font> <font color="#c040c0">\xe1\xf2\xf6\xee\xea</font> <font color="#c040c0">\xec\xe3\xe1\xf8</font> <font color="#c040c0">\xf2\xf8\xe1\xe9\xfa</font>', <strong>Errors</strong> = 'ignore'</font></small></td></tr></tbody></table></p><p><strong>UnicodeDecodeError</strong>: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)
<br><tt><small> </small> </tt>args =
('ascii', '<font color="#c040c0">\xc3\xac\xc3\xae\xc3\xa3</font> <font color="#c040c0">\xc3\xa1\xc3\xb2\xc3\xb6\xc3\xae\xc3\xaa</font> <font color="#c040c0">\xc3\xac\xc3\xa3\xc3\xa1\xc3\xb8</font> <font color="#c040c0">\xc3\xb2\xc3\xb8\xc3\xa1\xc3\xa9\xc3\xba</font>', 0, 1, 'ordinal not in range(128)')
<br><tt><small> </small> </tt>encoding =
'ascii'
<br><tt><small> </small> </tt>end =
1
<br><tt><small> </small> </tt>object =
'<font color="#c040c0">\xc3\xac\xc3\xae\xc3\xa3</font> <font color="#c040c0">\xc3\xa1\xc3\xb2\xc3\xb6\xc3\xae\xc3\xaa</font> <font color="#c040c0">\xc3\xac\xc3\xa3\xc3\xa1\xc3\xb8</font> <font color="#c040c0">\xc3\xb2\xc3\xb8\xc3\xa1\xc3\xa9\xc3\xba</font>'
<br><tt><small> </small> </tt>reason =
'ordinal not in range(128)'
<br><tt><small> </small> </tt>start =
0
<!-- The above is a description of an error in a Python program, formatted
for a Web browser because the 'cgitb' module was enabled. In case you
are not reading this in a Web browser, here is the original traceback:
Traceback (most recent call last):
File "tmda-cgi.py", line 190, in ?
Call(PendList)
File "tmda-cgi.py", line 88, in Call
Library.Show()
File "/home/wf/tmda-cgi-0.15/PendList.py", line 507, in Show
value += Unicode.TranslateToUTF8(CharSet, decoded[0], "ignore")
File "/home/wf/tmda-cgi-0.15/Unicode.py", line 104, in TranslateToUTF8
return "(%s) %s" % (CharSet,
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)
-->
</p></td></tr>
</tbody></table></td>
<!-- end of body cell -->
</tr><!-- end of sidebar/body row -->
</tbody></table><!-- end of page table -->
<script>
<!--
function Preloader()
{
}
//-->
</script>
</body></html>
1163255715.20862.msg
(text/plain, 6.5 KB)
Return-Path: <[email protected]> Delivered-To: my-email-address Received: (qmail 20857 invoked by uid 1002); 11 Nov 2006 14:35:15 -0000 Received: from 84.95.2.10 by vs8107 (envelope-from <[email protected]>, uid 64011) with qmail-scanner-2.01 (spamassassin: 3.0.3. Clear:RC:0(84.95.2.10):SA:1(8.8/5.0):. Processed in 6.590074 secs); 11 Nov 2006 14:35:15 -0000 X-Envelope-From: [email protected] Received: from mtaout4.012.net.il (84.95.2.10) by zarquon.flexoft.net with SMTP; 11 Nov 2006 14:35:08 -0000 Received: from hayzc1a3e42c6e5 ([87.69.233.69]) by i_mtaout4.012.net.il (HyperSendmail v2004.12) with ESMTP id <0J8K003KQLWON311@i_mtaout4.012.net.il> for my-email-address; Sat, 11 Nov 2006 16:36:25 +0200 (IST) Date: Sat, 11 Nov 2006 10:03:43 +0200 From: =?iso-8859-8-i?B?7unw+OXk?= <[email protected]> Subject: =?iso-8859-8-i?B?7O7jIOHy9u7qIOzj4fgg8vjh6fo=?= To: my-email-address Reply-to: =?iso-8859-8-i?B?7unw+OXk?= <[email protected]> Message-id: <[email protected]> MIME-version: 1.0 Content-type: text/html; charset=iso-8859-8-i Content-transfer-encoding: 8BIT X-Spam-Flag: YES X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on vs8107.vserver4free.de X-Spam-Level: ******** X-Spam-Status: Yes, score=8.8 required=5.0 tests=BAYES_60,DCC_CHECK, DIGEST_MULTIPLE,DNS_FROM_RFC_POST,HTML_90_100,HTML_FONT_BIG, HTML_IMAGE_RATIO_02,HTML_MESSAGE,HTML_TAG_EXIST_TBODY, HTML_TITLE_EMPTY,MAILTO_SUBJ_REMOVE,MAILTO_TO_REMOVE,MIME_HTML_ONLY, RAZOR2_CF_RANGE_51_100,RAZOR2_CHECK,RCVD_IN_BL_SPAMCOP_NET autolearn=no version=3.0.3 X-Spam-Report: * 0.1 MAILTO_TO_REMOVE URI: Includes a 'remove' email address * 1.0 BAYES_60 BODY: Bayesian spam probability is 60 to 80% * [score: 0.6937] * 0.0 HTML_MESSAGE BODY: HTML included in message * 0.1 HTML_FONT_BIG BODY: HTML tag for a big font size * 0.1 HTML_TAG_EXIST_TBODY BODY: HTML has "tbody" tag * 0.1 RAZOR2_CF_RANGE_51_100 BODY: Razor2 gives confidence level above 50% * [cf: 100] * 0.2 MIME_HTML_ONLY BODY: Message only has text/html MIME parts * 0.0 HTML_IMAGE_RATIO_02 BODY: HTML has a low ratio of text to image area * 0.0 HTML_90_100 BODY: Message is 90% to 100% HTML * 0.0 HTML_TITLE_EMPTY BODY: HTML title contains no text * 0.5 MAILTO_SUBJ_REMOVE RAW: mailto URI includes removal text * 1.5 RAZOR2_CHECK Listed in Razor2 (http://razor.sf.net/) * 2.2 DCC_CHECK Listed in DCC (http://rhyolite.com/anti-spam/dcc/) * 1.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net * [Blocked - see <http://www.spamcop.net/bl.shtml?87.69.233.69>] * 1.6 DNS_FROM_RFC_POST RBL: Envelope sender in postmaster.rfc-ignorant.org * 0.1 DIGEST_MULTIPLE Message hits more than one network digest check X-TMDA-Recipient: my-email-address <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML dir=rtl><HEAD><TITLE></TITLE> <META http-equiv=Content-Type content="text/html; charset=iso-8859-8-i"> <META http-equiv=Content-Language content=he> <META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD> <BODY> <DIV><FONT face=Arial size=2> <DIV dir=rtl align=right> <TABLE borderColor=#f5c905 cellSpacing=0 borderColorDark=#993300 cellPadding=2 width=625 borderColorLight=#993300 border=6> <TBODY> <TR> <TD borderColor=#993300 borderColorLight=#993300 align=middle bgColor=#993300 borderColorDark=#993300> <TABLE borderColor=#993300 cellSpacing=0 borderColorDark=#993300 cellPadding=50 width="100%" bgColor=#993300 borderColorLight=#993300 border=1> <TBODY> <TR> <TD vAlign=top width="100%" bgColor=#fffdf4><SPAN lang=HE style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"><B><A href="http://www.to-speak-arabic.com"><IMG height=600 src="http://www.to-speak-arabic.com/speakingarabic-intro.jpg" width=525 border=0></A> <TABLE id=table1 width=567 border=0> <TBODY><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"></TBODY></TABLE></SPAN><FONT face=Arial size=2> <P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 150%" align=center><FONT color=#0000ff size=6><A href="http://www.speaking-arabic.com">ìôøèéí ðåñôéí</A></FONT></FONT></SPAN><A href="http://www.speaking-arabic.com"><SPAN lang=HE style="COLOR: black; FONT-FAMILY: Arial"><FONT face=Arial color=#000000 size=4> </FONT></SPAN><SPAN lang=HE style="FONT-FAMILY: Arial"><FONT face=Arial color=#0000ff size=4>-</FONT></SPAN><SPAN lang=HE style="FONT-FAMILY: Arial"><FONT face=Arial size=2><FONT color=#0000ff size=4><FONT face=Arial>ìçõ ëàï</FONT></FONT></FONT></SPAN></A><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"></SPAN><SPAN lang=HE style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> <P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 150%" align=center> <P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 150%" align=center><FONT color=#0000ff size=5> àå äú÷ùøå 02-5661612</FONT></SPAN><SPAN lang=HE style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> <P dir=rtl align=center><SPAN lang=he><FONT size=1>äåãòä æå ðùìçä ìê áàåôï çã ôòîé - àðå îúðöìéí àí ðâøîä ìê àé ðåçåú. ìäñøä <A href="mailto:[email protected]?subject=REMOVE">ìçõ ëàï</A></FONT></SPAN> </P></SPAN></FONT><SPAN lang=HE style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"><SPAN lang=HE style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"> <P class=nlbodytext dir=rtl style="DIRECTION: rtl; unicode-bidi: embed; TEXT-ALIGN: center" align=center><SPAN lang=AR-SA style="FONT-SIZE: 7pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-language: AR-SA"><BR> </SPAN></P></B><SPAN lang=HE style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"><SPAN lang=HE style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"><SPAN lang=HE style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Arial"><O:P></O:P></SPAN><SPAN lang=HE><O:P></O:P></SPAN></SPAN></SPAN></SPAN></SPAN></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></FONT></DIV></BODY></HTML>