[Zope] Catalog and unicode

Vágó István VagoI@Richter.hu
Thu, 13 Feb 2003 18:35:25 +0100


This is a multi-part message in MIME format.

------_=_NextPart_001_01C2D386.4AA2CF2D
Content-Type: text/plain;
	charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

Hello,

I have some trouble with looking up Unicode values from KeywordIndex and =
FieldIndex.=20
I got UnicodeError, ASCII decoding error: ordinal not in range(128) when =
trying to look up an existing key from a FieldIndex with iso-8859-2 =
characters in it.=20
Can somebody suggest a solution for this?

Thanks,

Istvan Vago

Here is the traceback:

Traceback (innermost last):
  Module ZPublisher.Publish, line 98, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 39, in call_object
  Module Shared.DC.Scripts.Bindings, line 252, in __call__
  Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec
  Module Products.CMFCore.FSPageTemplate, line 163, in _exec
  Module Products.PageTemplates.ZopePageTemplate, line 228, in _exec
  Module Products.CMFCore.FSPageTemplate, line 139, in pt_render
  Module Products.PageTemplates.PageTemplate, line 95, in pt_render
   - <FSPageTemplate at /RGSite/mail_search>
  Module TAL.TALInterpreter, line 200, in __call__
  Module TAL.TALInterpreter, line 244, in interpret
  Module TAL.TALInterpreter, line 703, in do_useMacro
  Module TAL.TALInterpreter, line 244, in interpret
  Module TAL.TALInterpreter, line 726, in do_defineSlot
  Module TAL.TALInterpreter, line 244, in interpret
  Module TAL.TALInterpreter, line 473, in do_setLocal_tal
  Module Products.PageTemplates.TALES, line 217, in evaluate
   - URL: /RGSite/main_template
   - Line 10, Column 0
   - Expression: <PythonExpr here.doMailSearch( REQUEST=3Drequest )>
   - Names:
      {'container': <CMFSite instance at 8cd3910>,
       'default': <Products.PageTemplates.TALES.Default instance at =
0x86efb94>,
       'here': <CMFSite instance at 8cd3910>,
       'loop': <SafeMapping instance at 8a31188>,
       'modules': =
<Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at =
0x86dd43c>,
       'nothing': None,
       'options': {'args': ()},
       'repeat': <SafeMapping instance at 8a31188>,
       'request': <HTTPRequest, =
URL=3Dhttp://cadd.intra.richter.hu/Zope/RGSite/mail_search>,
       'root': <Application instance at 8a89fa0>,
       'template': <FSPageTemplate at /RGSite/mail_search>,
       'traverse_subpath': [],
       'user': Anonymous User}
  Module Products.PageTemplates.ZRPythonExpr, line 48, in __call__
   - __traceback_info__: here.doMailSearch( REQUEST=3Drequest )
  Module Python expression "here.doMailSearch( REQUEST=3Drequest )", =
line 2, in f
  Module Products.CMFCore.FSPythonScript, line 90, in __call__
  Module Shared.DC.Scripts.Bindings, line 252, in __call__
  Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec
  Module Products.CMFCore.FSPythonScript, line 124, in _exec
   - __traceback_info__: ({'script': <FSPythonScript at =
/RGSite/doMailSearch>, 'context': <CMFSite instance at 8cd3910>, =
'container': <CMFSite instance at 8cd3910>, 'traverse_subpath': []}, (), =
{'REQUEST': <HTTPRequest, =
URL=3Dhttp://cadd.intra.richter.hu/Zope/RGSite/mail_search>}, None)
  Module Script (Python), line 67, in doMailSearch
  Module Products.CMFCore.CatalogTool, line 214, in searchResults
  Module Products.ZCatalog.ZCatalog, line 619, in searchResults
  Module Products.ZCatalog.Catalog, line 732, in searchResults
  Module Products.ZCatalog.Catalog, line 480, in search
  Module Products.PluginIndexes.common.UnIndex, line 373, in =
_apply_index
UnicodeError: ASCII decoding error: ordinal not in range(128)

------_=_NextPart_001_01C2D386.4AA2CF2D
Content-Type: text/html;
	charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-2">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.0.6249.1">
<TITLE>Catalog and unicode</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=3D2>Hello,</FONT>
</P>

<P><FONT SIZE=3D2>I have some trouble with looking up Unicode values =
from KeywordIndex and FieldIndex. </FONT>

<BR><FONT SIZE=3D2>I got UnicodeError, ASCII decoding error: ordinal not =
in range(128) when trying to look up an existing key from a FieldIndex =
with iso-8859-2 characters in it. </FONT></P>

<P><FONT SIZE=3D2>Can somebody suggest a solution for this?</FONT>
</P>

<P><FONT SIZE=3D2>Thanks,</FONT>
</P>

<P><FONT SIZE=3D2>Istvan Vago</FONT>
</P>

<P><FONT SIZE=3D2>Here is the traceback:</FONT>
</P>

<P><FONT SIZE=3D2>Traceback (innermost last):</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module ZPublisher.Publish, line 98, in =
publish</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module ZPublisher.mapply, line 88, in =
mapply</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module ZPublisher.Publish, line 39, in =
call_object</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module Shared.DC.Scripts.Bindings, line 252, =
in __call__</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module Shared.DC.Scripts.Bindings, line 283, =
in _bindAndExec</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module Products.CMFCore.FSPageTemplate, line =
163, in _exec</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module =
Products.PageTemplates.ZopePageTemplate, line 228, in _exec</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module Products.CMFCore.FSPageTemplate, line =
139, in pt_render</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module Products.PageTemplates.PageTemplate, =
line 95, in pt_render</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp; - &lt;FSPageTemplate at =
/RGSite/mail_search&gt;</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module TAL.TALInterpreter, line 200, in =
__call__</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module TAL.TALInterpreter, line 244, in =
interpret</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module TAL.TALInterpreter, line 703, in =
do_useMacro</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module TAL.TALInterpreter, line 244, in =
interpret</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module TAL.TALInterpreter, line 726, in =
do_defineSlot</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module TAL.TALInterpreter, line 244, in =
interpret</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module TAL.TALInterpreter, line 473, in =
do_setLocal_tal</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module Products.PageTemplates.TALES, line 217, =
in evaluate</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp; - URL: /RGSite/main_template</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp; - Line 10, Column 0</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp; - Expression: &lt;PythonExpr =
here.doMailSearch( REQUEST=3Drequest )&gt;</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp; - Names:</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {'container': =
&lt;CMFSite instance at 8cd3910&gt;,</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'default': =
&lt;Products.PageTemplates.TALES.Default instance at =
0x86efb94&gt;,</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'here': =
&lt;CMFSite instance at 8cd3910&gt;,</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'loop': =
&lt;SafeMapping instance at 8a31188&gt;,</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'modules': =
&lt;Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance =
at 0x86dd43c&gt;,</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'nothing': =
None,</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'options': =
{'args': ()},</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'repeat': =
&lt;SafeMapping instance at 8a31188&gt;,</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'request': =
&lt;HTTPRequest, URL=3D<A =
HREF=3D"http://cadd.intra.richter.hu/Zope/RGSite/mail_search">http://cadd=
.intra.richter.hu/Zope/RGSite/mail_search</A>&gt;,</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'root': =
&lt;Application instance at 8a89fa0&gt;,</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'template': =
&lt;FSPageTemplate at /RGSite/mail_search&gt;,</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
'traverse_subpath': [],</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'user': =
Anonymous User}</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module Products.PageTemplates.ZRPythonExpr, =
line 48, in __call__</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp; - __traceback_info__: here.doMailSearch( =
REQUEST=3Drequest )</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module Python expression =
&quot;here.doMailSearch( REQUEST=3Drequest )&quot;, line 2, in f</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module Products.CMFCore.FSPythonScript, line =
90, in __call__</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module Shared.DC.Scripts.Bindings, line 252, =
in __call__</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module Shared.DC.Scripts.Bindings, line 283, =
in _bindAndExec</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module Products.CMFCore.FSPythonScript, line =
124, in _exec</FONT>

<BR><FONT SIZE=3D2>&nbsp;&nbsp; - __traceback_info__: ({'script': =
&lt;FSPythonScript at /RGSite/doMailSearch&gt;, 'context': &lt;CMFSite =
instance at 8cd3910&gt;, 'container': &lt;CMFSite instance at =
8cd3910&gt;, 'traverse_subpath': []}, (), {'REQUEST': &lt;HTTPRequest, =
URL=3D<A =
HREF=3D"http://cadd.intra.richter.hu/Zope/RGSite/mail_search">http://cadd=
.intra.richter.hu/Zope/RGSite/mail_search</A>&gt;}, None)</FONT></P>

<P><FONT SIZE=3D2>&nbsp; Module Script (Python), line 67, in =
doMailSearch</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module Products.CMFCore.CatalogTool, line 214, =
in searchResults</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module Products.ZCatalog.ZCatalog, line 619, =
in searchResults</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module Products.ZCatalog.Catalog, line 732, in =
searchResults</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module Products.ZCatalog.Catalog, line 480, in =
search</FONT>

<BR><FONT SIZE=3D2>&nbsp; Module Products.PluginIndexes.common.UnIndex, =
line 373, in _apply_index</FONT>

<BR><FONT SIZE=3D2>UnicodeError: ASCII decoding error: ordinal not in =
range(128)</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C2D386.4AA2CF2D--