Hi.

Recently I've decided to use Zope as a framework for an application that
I'm planning to write as a part of my B.Sc. thesis. I also chose to use
Zope3, though it's not as well documented (yet) and widely used as the
previous version. And unfortunately *it* surfaced at the very beginning...

The problem is that I can't run the simplest application.

I went through http://www.plope.com/Books/2_7Edition/ZPT.stx and I tried
to run the exemplary application (the chapter should be finished
according to: http://www.plope.com/Books/zb_signup):

---

<html>
 <body>
  <p>Title<span tal:content="template/title">No title</span>.
 </body>
</html>

---

I created both the folder and the template (I think) correctly - in the
upper left corner, when editing the ZPT, I can see:

---

 Location: [top]  / template_test / my_sample_page /

---

But the problem is that, whenever I try to "run" it (by opening):

http://localhost:8080/template_test/my_sample_page

I get:

---

 A system error occurred.

---

The execption stack/info is as follows:

---

Header
Exception traceback
Time
Fri Dec 23 22:28:34 2005
User
admin, zope.manager, Manager,
Request URL
http://localhost:8080/template_test/my_sample_page
Exception Type
TraversalError
Exception Value
(<zope.app.zptpage.zptpage.ZPTPage object at 0x2aaab15f8758>, 'title')
Traceback


Traceback (innermost last):

    * Module zope.publisher.publish, line 138, in publish
      result = publication.callObject(request, object)
    * Module zope.app.publication.zopepublication, line 164, in callObject
      return mapply(ob, request.getPositionalArguments(), request)
    * Module zope.publisher.publish, line 113, in mapply
      return debug_call(object, args)
      __traceback_info__: <bound method ZPTPageEval.index of
<zope.app.publisher.browser.viewmeta.ZPTPageEval object at 0x2aaab2947250>>
    * Module zope.publisher.publish, line 119, in debug_call
      return object(*args)
    * Module zope.app.zptpage.browser.zptpage, line 29, in index
      return template.render(request, **kw)
    * Module zope.app.zptpage.zptpage, line 92, in render
      sourceAnnotations=debug_flags.sourceAnnotations)
    * Module zope.pagetemplate.pagetemplate, line 117, in pt_render
      strictinsert=0, sourceAnnotations=sourceAnnotations)()
    * Module zope.tal.talinterpreter, line 270, in __call__
      self.interpret(self.program)
    * Module zope.tal.talinterpreter, line 345, in interpret
      handlers[opcode](self, args)
    * Module zope.tal.talinterpreter, line 618, in do_insertText_tal
      text = self.engine.evaluateText(stuff[0])
    * Module zope.app.pagetemplate.engine, line 101, in evaluateText
      text = self.evaluate(expr)
    * Module zope.tales.tales, line 698, in evaluate
      return expression(self)
      /template_test/my_sample_page
      Line 3, Column 10
      Expression: <PathExpr standard:u'template/title'>
         - Names:
            {'args': (),
             'container': <zope.app.folder.folder.Folder object at
0x2aaab13bac80>,
             'context': <zope.app.folder.folder.Folder object at
0x2aaab13bac80>,
             'default': <object object at 0x2aaaaab27200>,
             'loop': {},
             'nothing': None,
             'options': {},
             'repeat': {},
             'request': <zope.publisher.browser.BrowserRequest instance
URL=http://localhost:8080/template_test/my_sample_page>,
             'template': <zope.app.zptpage.zptpage.ZPTPage object at
0x2aaab15f8758>,
             'usage': <zope.pagetemplate.pagetemplate.TemplateUsage
object at 0x2aaab25b8e50>}
    * Module zope.tales.expressions, line 204, in __call__
      return self._eval(econtext)
    * Module zope.tales.expressions, line 191, in _eval
      ob = self._subexprs[-1](econtext)
    * Module zope.tales.expressions, line 123, in _eval
      ob = self._traverser(ob, element, econtext)
    * Module zope.app.pagetemplate.engine, line 57, in zopeTraverser
      request=request)
    * Module zope.app.traversing.adapters, line 177, in traversePathElement
      return traversable.traverse(nm, further_path)
    * Module zope.app.traversing.adapters, line 61, in traverse
      raise TraversalError(subject, name)
      __traceback_info__: (<zope.app.zptpage.zptpage.ZPTPage object at
0x2aaab15f8758>, 'title', [])

TraversalError: (<zope.app.zptpage.zptpage.ZPTPage object at
0x2aaab15f8758>, 'title')

Display traceback as text
REQUEST
HTTP_ACCEPT :
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
SERVER_SOFTWARE : zope.server.http (HTTP)
SCRIPT_NAME :
CHANNEL_CREATION_TIME : 1135373314.86
REQUEST_METHOD : GET
HTTP_HOST : localhost:8080
PATH_INFO : /template_test/my_sample_page
SERVER_PROTOCOL : HTTP/1.1
QUERY_STRING :
CONNECTION_TYPE : keep-alive
HTTP_ACCEPT_CHARSET : ISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_USER_AGENT : Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12)
Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7
SERVER_NAME : dirt.onoclea.net
GATEWAY_INTERFACE : CGI/1.1
REMOTE_ADDR : 127.0.0.1
HTTP_ACCEPT_LANGUAGE : en-us,en;q=0.5
SERVER_PORT : 8080
HTTP_ACCEPT_ENCODING : gzip,deflate
HTTP_KEEP_ALIVE : 300

---

The "funny" thing is, that when I type "request/URL" instead of
"template/title" it works fine...

Does anyone have a clue what is the source of the problem? I'd
appreciate any kind of answer - even RTFM will do :) as long as you
point me to the right *M*.

Best regards,
Pawel Sawicki

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to