Re: [Zope3-Users] TraversalError when accessing "template/title" for the ZPT.

2005-12-23 Thread Zachery Bir

On Dec 23, 2005, at 4:43 PM, Pawel Sawicki wrote:


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.


I'd say Zope 3 is actually much *better* documented than Zope 2.


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):


I'm afraid you probably won't get very far using the Zope 2.7 edition  
book with Zope 3.


You might try the Zope 3 Book, instead:

  


Zac

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


[Zope3-Users] TraversalError when accessing "template/title" for the ZPT.

2005-12-23 Thread Pawel Sawicki

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):

---


 
  TitleNo title.
 


---

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
(, '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__: >
* 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: 
 - Names:
{'args': (),
 'container': ,
 'context': ,
 'default': ,
 'loop': {},
 'nothing': None,
 'options': {},
 'repeat': {},
 'request': http://localhost:8080/template_test/my_sample_page>,
 'template': ,
 'usage': }
* 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__: (, 'title', [])

TraversalError: (, '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