Submitted by : betabug at: 2007-10-03T13:05:15-07:00 (10 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

I'm getting a UnicodeDecodeError? when I search for "link-updating problem stop" on the built in search on (old.)zwiki.org.

Some other searches I've tryed (e.g. searching for "anything") worked.

Searches that worked:

Errors: Searches that give the traceback:

Traceback:

UnicodeDecodeError
...snip...
Module ZPublisher.Publish, line 202, in publish_module_standard
Module ZPublisher.Publish, line 150, in publish
Module plone.app.linkintegrity.monkey, line 21, in zpublisher_exception_hook_wrapper
Module Zope2.App.startup, line 221, in zpublisher_exception_hook
Module ZPublisher.Publish, line 119, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 42, in call_object
Module Products.ZWiki.Views, line 499, in searchwiki
Module Shared.DC.Scripts.Bindings, line 313, in __call__
Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
Module Products.PageTemplates.PageTemplateFile, line 129, in _exec
Module Products.PageTemplates.PageTemplate, line 89, in pt_render
Module zope.pagetemplate.pagetemplate, line 117, in pt_render
Module zope.tal.talinterpreter, line 271, in __call__
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 891, in do_useMacro
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 949, in do_defineSlot
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 745, in do_insertStructure_tal
Module zope.tales.tales, line 696, in evaluate
URL: searchwiki
Line 13, Column 6
Expression: <PythonExpr here.talsafe( here.getSkinTemplate('SearchPage')(here,request))>
Names:
{'container': <BTreeFolder2 at /zwikib>,
 'context': <ZWikiPage 'FrontPage' at 0x438f708c>,
 'default': <object object at 0x401ed528>,
 'here': <ZWikiPage 'FrontPage' at 0x438f708c>,
 'loop': {},
 'nothing': None,
 'options': {'args': (<ZWikiPage 'FrontPage' at 0x438f708c>,
                      <HTTPRequest, URL=http://zwiki.org/FrontPage/searchwiki>)},
 'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x43b4a58c>,
 'request': <HTTPRequest, URL=http://zwiki.org/FrontPage/searchwiki>,
 'root': <Application at >,
 'template': <PageTemplateFile at /zwikib/searchwiki used for /zwikib/FrontPage>,
 'user': <SpecialUser 'Anonymous User'>}
Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
__traceback_info__: here.talsafe( here.getSkinTemplate('SearchPage')(here,request))
Module PythonExpr, line 1, in <expression>
Module Products.ZWiki.Utils, line 560, in talsafe
UnicodeDecodeError

same problem here --ViNiL?, Thu, 24 Jan 2008 16:34:09 +0000 reply

Error:

URL: searchwiki
Line 13, Column 6
Expression: <PythonExpr here.talsafe( here.getSkinTemplate('SearchPage')(here,request))>
Names:

{'container': <Folder at /www.py.cz>,
 'context': <ZWikiPage 'FrontPage' at 0xx7e852414>,
 'default': <object object at 0xb7c46530>,
 'here': <ZWikiPage 'FrontPage' at 0xx7e852414>,
 'loop': {},
 'nothing': None,
 'options': {'args': (<ZWikiPage 'FrontPage' at 0xx7e852414>,
                      <HTTPRequest, URL=http://www.py.cz/FrontPage/searchwiki>)},
 'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x815cc90c>,
 'request': <HTTPRequest, URL=http://www.py.cz/FrontPage/searchwiki>,
 'root': <Application at >,
 'template': <PageTemplateFile at /www.py.cz/searchwiki used for /www.py.cz/FrontPage>,
 'user': <User 'pycz'>}

on wiki.zope.org/zope3 too --betabug, Wed, 30 Jan 2008 04:05:15 -0800 reply

Searching for "book" raises the same error there.

download --geon, Tue, 12 Feb 2008 02:42:49 -0800 reply

searching for "download" is the same error with me.

removing the here.talsafe... --betabug, Fri, 28 Mar 2008 03:44:55 -0700 reply

On one of my wikis, which recently got a lot of those failed searches, I removed the here.talsafe() in skins/zwiki/searchwiki.pt and searches seemed to start working again. I'll have to investigate more.

Here is what I have so far:

hunk ./skins/zwiki/searchwiki.pt 14
-           tal:content="structure python:here.talsafe(
-                        here.getSkinTemplate('SearchPage')(here,request))">
+           tal:content="structure python:
+                        here.getSkinTemplate('SearchPage')(here,request)">
}

This patch passes our tests, it solves the UnicodeDecodeError? on searches in at least one of my wikis, but it might need more testing. Please test, anybody who has this problem and report results here!

fixed in both stable and unstable --simon, Thu, 01 May 2008 18:42:38 -0700 reply

Status: open => closed

I backported some unicode utilities and made this work.. the problem was excerptAt trampling on encoding, which later prevented the necessary conversion to unicode by searchwiki.pt, as I think betabug might have told me once.