[Zope3-dev] server error in apidoc (encoding pb)
Christophe Combelles
ccomb at free.fr
Tue Jan 16 11:01:28 EST 2007
Christophe Combelles a écrit :
>> When I put some accentuated character in the docstring of an interface
>> and I want to see the interface doc in
>> apidoc->interfaces->search->IMyInterface,
>>
>> I then get a server error:
Here is the full backtrace:
------
2007-01-16T16:58:11 ERROR SiteError
http://localhost:9673/++apidoc++/Interface/zblog.category.interfaces.ICategory/index.html
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/zope/publisher/publish.py", line 133,
in publish
result = publication.callObject(request, obj)
File
"/usr/lib/python2.4/site-packages/zope/app/publication/zopepublication.py", line
161, in callObject
return mapply(ob, request.getPositionalArguments(), request)
File "/usr/lib/python2.4/site-packages/zope/publisher/publish.py", line 108,
in mapply
return debug_call(obj, args)
- __traceback_info__: <security proxied
zope.app.pagetemplate.simpleviewclass.SimpleViewClass from
/usr/lib/zope3/lib/python/zope/app/apidoc/ifacemodule/index.pt instance at
0xb57112cc>
File "/usr/lib/python2.4/site-packages/zope/publisher/publish.py", line 114,
in debug_call
return obj(*args)
File
"/usr/lib/python2.4/site-packages/zope/app/pagetemplate/simpleviewclass.py",
line 44, in __call__
return self.index(*args, **kw)
File
"/usr/lib/python2.4/site-packages/zope/app/pagetemplate/viewpagetemplatefile.py",
line 83, in __call__
return self.im_func(im_self, *args, **kw)
File
"/usr/lib/python2.4/site-packages/zope/app/pagetemplate/viewpagetemplatefile.py",
line 51, in __call__
sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
File "/usr/lib/python2.4/site-packages/zope/pagetemplate/pagetemplate.py",
line 117, in pt_render
strictinsert=0, sourceAnnotations=sourceAnnotations)()
File "/usr/lib/python2.4/site-packages/zope/tal/talinterpreter.py", line 271,
in __call__
self.interpret(self.program)
File "/usr/lib/python2.4/site-packages/zope/tal/talinterpreter.py", line 346,
in interpret
handlers[opcode](self, args)
File "/usr/lib/python2.4/site-packages/zope/tal/talinterpreter.py", line 891,
in do_useMacro
self.interpret(macro)
File "/usr/lib/python2.4/site-packages/zope/tal/talinterpreter.py", line 346,
in interpret
handlers[opcode](self, args)
File "/usr/lib/python2.4/site-packages/zope/tal/talinterpreter.py", line 536,
in do_optTag_tal
self.do_optTag(stuff)
File "/usr/lib/python2.4/site-packages/zope/tal/talinterpreter.py", line 521,
in do_optTag
return self.no_tag(start, program)
File "/usr/lib/python2.4/site-packages/zope/tal/talinterpreter.py", line 516,
in no_tag
self.interpret(program)
File "/usr/lib/python2.4/site-packages/zope/tal/talinterpreter.py", line 346,
in interpret
handlers[opcode](self, args)
File "/usr/lib/python2.4/site-packages/zope/tal/talinterpreter.py", line 949,
in do_defineSlot
self.interpret(slot)
File "/usr/lib/python2.4/site-packages/zope/tal/talinterpreter.py", line 346,
in interpret
handlers[opcode](self, args)
File "/usr/lib/python2.4/site-packages/zope/tal/talinterpreter.py", line 745,
in do_insertStructure_tal
structure = self.engine.evaluateStructure(expr)
File "/usr/lib/python2.4/site-packages/zope/tales/tales.py", line 696, in
evaluate
return expression(self)
- /usr/lib/zope3/lib/python/zope/app/apidoc/ifacemodule/index.pt
- Line 23, Column 4
- Expression: <PathExpr standard:u'view/getDoc'>
- Names:
{'args': (),
'context': <InterfaceClass zblog.category.interfaces.ICategory>,
'default': <object object at 0xb7dab548>,
'loop': {},
'nothing': None,
'options': {},
'repeat': {},
'request': <zope.publisher.browser.BrowserRequest instance
URL=http://localhost:9673/++apidoc++/Interface/zblog.category.interfaces.ICategory/index.html>,
'template':
<zope.app.pagetemplate.viewpagetemplatefile.ViewPageTemplateFile object at
0xb6a2c9ac>,
'usage': <zope.pagetemplate.pagetemplate.TemplateUsage object at
0xb5711ccc>,
'view': <zope.app.pagetemplate.simpleviewclass.SimpleViewClass from
/usr/lib/zope3/lib/python/zope/app/apidoc/ifacemodule/index.pt object at
0xb57112cc>,
'views': <zope.app.pagetemplate.viewpagetemplatefile.ViewMapper object
at 0xb5711d4c>}
File "/usr/lib/python2.4/site-packages/zope/tales/expressions.py", line 217,
in __call__
return self._eval(econtext)
File "/usr/lib/python2.4/site-packages/zope/tales/expressions.py", line 211,
in _eval
return ob()
File
"/usr/lib/python2.4/site-packages/zope/app/apidoc/ifacemodule/browser.py", line
85, in getDoc
return renderText(iface.__doc__, inspect.getmodule(iface))
File "/usr/lib/python2.4/site-packages/zope/app/apidoc/utilities.py", line
327, in renderText
source = createObject(format, text)
File "/usr/lib/python2.4/site-packages/zope/component/_api.py", line 224, in
createObject
return getUtility(IFactory, __factory_name, context)(*args, **kwargs)
File "/usr/lib/python2.4/site-packages/zope/app/renderer/__init__.py", line
41, in __call__
source = Source(ustr)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 38: ordinal
not in range(128)
127.0.0.1 - - [16/Jan/2007:16:58:11 +0200] "GET
/++apidoc++/Interface/zblog.category.interfaces.ICategory/index.html HTTP/1.1"
500 94 "http://localhost:9673/++apidoc++/Interface/@@menu.html" "Mozilla/5.0
(X11; U; Linux i686; fr; rv:1.8.1.1) Gecko/20061205 Iceweasel/2.0.0.1
(Debian-2.0.0.1+dfsg-1)"
127.0.0.1 - - [16/Jan/2007:16:58:12 +0200] "GET /favicon.ico HTTP/1.1" 404 4258
"-" "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.8.1.1) Gecko/20061205
Iceweasel/2.0.0.1 (Debian-2.0.0.1+dfsg-1)"
More information about the Zope3-dev
mailing list