#0925 Unicode error 0xa0 and 0xc2
After upgrading to version 2.12.5, python version 2.6.2 we are for some users getting the following traceback.
2010-06-03 15:15:49 ERROR Zope.SiteErrorLog 1275570949.040.258806611142 http://adminsrv01.flowtraders.nl:8080/ITP-IT/ListIssues
Traceback (innermost last):
Module ZPublisher.Publish, line 127, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 47, in call_object
Module Shared.DC.Scripts.Bindings, line 324, in __call__
Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec
Module Products.PageTemplates.PageTemplateFile, line 130, in _exec
Module Products.PageTemplates.PageTemplate, line 80, in pt_render
Module zope.pagetemplate.pagetemplate, line 115, in pt_render
Module zope.tal.talinterpreter, line 271, in __call__
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 888, in do_useMacro
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 533, in do_optTag_tal
Module zope.tal.talinterpreter, line 518, in do_optTag
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 946, in do_defineSlot
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 531, in do_optTag_tal
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 531, in do_optTag_tal
Module zope.tal.talinterpreter, line 513, in no_tag
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 742, in do_insertStructure_tal
Module Products.PageTemplates.Expressions, line 220, in evaluateStructure
Module zope.tales.tales, line 696, in evaluate
- URL: ListIssues
- Line 36, Column 0
- Expression: <PythonExpr tmpl(batch=batch)>
- Names:
{'container': <IssueTracker at /ITP-IT>,
'context': <IssueTracker at /ITP-IT>,
'default': <object object at 0x2b415f0844d0>,
'here': <IssueTracker at /ITP-IT>,
'loop': {},
'nothing': None,
'options': {'args': ()},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x29057e8>,
'request': <HTTPRequest, URL=http://adminsrv01.flowtraders.nl:8080/ITP-IT/ListIssues>,
'root': <Application at >,
'template': <PageTemplateFile at /ITP-IT/ListIssues>,
'user': <IssueUser 'maartenvm'>}
Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
- __traceback_info__: tmpl(batch=batch)
Module PythonExpr, line 1, in <expression>
Module Shared.DC.Scripts.Bindings, line 324, in __call__
Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec
Module Products.PageTemplates.PageTemplateFile, line 130, in _exec
Module Products.PageTemplates.PageTemplate, line 80, in pt_render
Module zope.pagetemplate.pagetemplate, line 115, in pt_render
Module zope.tal.talinterpreter, line 271, in __call__
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 821, in do_loop_tal
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 742, in do_insertStructure_tal
Module Products.PageTemplates.Expressions, line 220, in evaluateStructure
Module zope.tales.tales, line 696, in evaluate
Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
- __traceback_info__: ', '.join(issue.getSections())+' '
Module PythonExpr, line 1, in <expression>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)
Traceback (most recent call last):
File "/usr/lib64/zope-2.12/lib/python/zExceptions/ExceptionFormatter.py", line 156, in formatLine
supp = factory(*args)
File "/usr/lib64/python2.6/site-packages/zope/tales/tales.py", line 747, in __init__
self.expression = repr(expression)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 44: ordinal not in range(128)
We have a further issue when trying to do an "Update Everything":
2010-06-03 15:17:50 WARNING OFS.Uninstalled Could not import class 'TextIndex' from module 'Products.PluginIndexes.TextIndex.TextIndex'
2010-06-03 15:17:51 ERROR Zope.SiteErrorLog 1275571071.070.339598672343 http://adminsrv01:8080/ITP-IT/UpdateEverything
Traceback (innermost last):
Module ZPublisher.Publish, line 127, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 47, in call_object
Module Products.IssueTrackerProduct.IssueTracker, line 1934, in UpdateEverything
Module Products.IssueTrackerProduct.IssueTracker, line 5895, in UpdateCatalog
Module Products.ZCatalog.ZCatalog, line 311, in manage_catalogClear
Module Products.ZCatalog.Catalog, line 109, in clear
AttributeError: clear
1 year and 8 months and 6 days old
I see. I'll try to have a look. I don't use 2.12 much myself but clearly something has changed to do with clearing the catalog. Seems that if the method manage_catalogClear works then it intern calls a clear method that no longer exists. In other words much possibly a Zope bug. But I'll try to look into it to see what can be done.
This bug has been fixed for 2.12.5 but I've committed some other dev work (should have been in a separate development branch longer) so if you update you'll get a fix but you'll also get some unfinished work on a new feature.
Regarding the clearing of the catalog I could not reproduce that. As you can see, the last two lines are in Zope itself. ZCatalog is calling Catalog wrong but that didn't happen for me. Weird.
Sorry, posted a new issue on the clear, forgotten I'd also posted it in this. Is it possible for me to export and mail you one of these issues so you could test it?
Just to wrap this one up. The first issue appears to be solved. For the second issue there is more information in issue http://real.issuetrackerproduct.com/0939
I'll follow that up in there and this issue can be closed.