#7 AttributeError?

open
SimpleAlias (3)
5
2004-10-14
2004-10-14
steven
No

I'm not sure exactly where the error seems to be. I
installed SimpleAlias as instructed. I then went to use
and it didn't work.

The initial error was:
Error Type
RuntimeError
Error Message
FS Page Template alias_view has errors:
exceptions.RuntimeError.
<pre>function attributes not accessible in
restricted mode</pre>

TRACEBACK Below:
2004-10-14T04:57:45 ERROR(200) SiteError
http://localhost:7080/Test1/alias.2004-10-14.8395302422/alias_view
Traceback (most recent call last):
File
"C:\Zope\Zope-Home\lib\python\ZPublisher\Publish.py",
line 101, in publish
request, bind=1)
File
"C:\Zope\Zope-Home\lib\python\ZPublisher\mapply.py",
line 88, in mapply
if debug is not None: return debug(object,args,context)
File
"C:\Zope\Zope-Home\lib\python\ZPublisher\Publish.py",
line 39, in call_object
result=apply(object,args) # Type s<cr> to step into
published object.
File
"C:\Zope\Zope-Home\lib\python\Shared\DC\Scripts\Bindings.py",
line 306, in __call__
return self._bindAndExec(args, kw, None)
File
"C:\Zope\Zope-Home\lib\python\Shared\DC\Scripts\Bindings.py",
line 343, in _bindAndExec
return self._exec(bound_data, args, kw)
File
"C:\Zope\Plone-Instance\Products\CMFCore\FSPageTemplate.py",
line 191, in _exec
result = self.pt_render(extra_context=bound_names)
File
"C:\Zope\Plone-Instance\Products\CMFCore\FSPageTemplate.py",
line 140, in pt_render
raise RuntimeError, msg
RuntimeError: FS Page Template alias_view has errors:
exceptions.RuntimeError.<br>&lt;pre&gt;function
attributes not accessible in restricted mode&lt;/pre&gt;

*********************************
The funny part is the Alias does appear in the Contents
view when I refresh. However when click on the link I
get another different error.

Error Type
AttributeError
Error Value
Test1/document_icon.gif
Request made at
2004/10/14 05:09:08.203 US/Eastern

TRACEBACK Below:
2004-10-14T05:09:07 ERROR(200) SiteError
http://localhost:7080/Test1/alias.2004-10-12.4286258166/folder_contents
Traceback (most recent call last):
File
"C:\Zope\Zope-Home\lib\python\ZPublisher\Publish.py",
line 101, in publish
request, bind=1)
File
"C:\Zope\Zope-Home\lib\python\ZPublisher\mapply.py",
line 88, in mapply
if debug is not None: return debug(object,args,context)
File
"C:\Zope\Zope-Home\lib\python\ZPublisher\Publish.py",
line 39, in call_object
result=apply(object,args) # Type s<cr> to step into
published object.
File
"C:\Zope\Zope-Home\lib\python\Shared\DC\Scripts\Bindings.py",
line 306, in __call__
return self._bindAndExec(args, kw, None)
File
"C:\Zope\Zope-Home\lib\python\Shared\DC\Scripts\Bindings.py",
line 343, in _bindAndExec
return self._exec(bound_data, args, kw)
File
"C:\Zope\Plone-Instance\Products\CMFCore\FSPageTemplate.py",
line 191, in _exec
result = self.pt_render(extra_context=bound_names)
File
"C:\Zope\Plone-Instance\Products\CMFCore\FSPageTemplate.py",
line 124, in pt_render
result =
FSPageTemplate.inheritedAttribute('pt_render')(
File
"C:\Zope\Zope-Home\lib\python\Products\PageTemplates\PageTemplate.py",
line 96, in pt_render
tal=not source, strictinsert=0)()
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 189, in __call__
self.interpret(self.program)
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 233, in interpret
handlers[opcode](self, args)
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 670, in do_useMacro
self.interpret(macro)
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 233, in interpret
handlers[opcode](self, args)
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 408, in do_optTag_tal
self.do_optTag(stuff)
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 393, in do_optTag
return self.no_tag(start, program)
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 388, in no_tag
self.interpret(program)
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 233, in interpret
handlers[opcode](self, args)
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 701, in do_defineSlot
self.interpret(block)
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 233, in interpret
handlers[opcode](self, args)
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 408, in do_optTag_tal
self.do_optTag(stuff)
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 393, in do_optTag
return self.no_tag(start, program)
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 388, in no_tag
self.interpret(program)
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 233, in interpret
handlers[opcode](self, args)
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 649, in do_defineMacro
self.interpret(macro)
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 233, in interpret
handlers[opcode](self, args)
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 693, in do_defineSlot
self.interpret(slot)
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 233, in interpret
handlers[opcode](self, args)
File
"C:\Zope\Zope-Home\lib\python\TAL\TALInterpreter.py",
line 568, in do_insertStructure_tal
structure = self.engine.evaluateStructure(expr)
File
"C:\Zope\Zope-Home\lib\python\Products\PageTemplates\TALES.py",
line 221, in evaluate
return expression(self)
File
"C:\Zope\Zope-Home\lib\python\Products\PageTemplates\ZRPythonExpr.py",
line 47, in __call__
return eval(code, g, {})
File "Python expression "getattr(here,
here.getIcon(1))"", line 1, in <expression>
AttributeError: Test1/document_icon.gif

*****************************

Discussion