- Ugh. Missing __doc__ causes major headaches
I spent a few stupid hours tracking this down... ZPublisher will complain that a "document cannot be found" if a method being referred to in a URL does not have a doc string (ie __doc__ or the ''' ...''' at the beginning of the method definition). Now, I remember reading something about this (doc strings required to make Bobo objects published) in the Bobo documentation back when bobo was the new hot thing, but it took me several hours to realize this was the problem tonight. I didn't see this mentioned in the Zope dox, and it had completely slipped my mind. Of course, now that I've found the problem, I see where its mentioned in the ORB Documentation. Someone might want to highlight this somewhere (a FAQ?). I was thinking a Product "Checklist" would be very useful. Also, examples of Folderish items... I ended up figuring out tonight's problem by following the stack trace and seeing that a missing __doc__ string causes the misleading (causing me a lot of my lost time) "document cannot be found" message. I noticed that there was a debug flag that would have probably gotten me to the problem quicker -- how do I turn that on? Anyway, I'm very happy to finally be able to make some forward progress and i hope to have my little XML/XSL product working soon! -Gabe
Gabe Wachob wrote:
I spent a few stupid hours tracking this down...
ZPublisher will complain that a "document cannot be found" if a method being referred to in a URL does not have a doc string (ie __doc__ or the ''' ...''' at the beginning of the method definition). Now, I remember reading something about this (doc strings required to make Bobo objects published) in the Bobo documentation back when bobo was the new hot thing, but it took me several hours to realize this was the problem tonight. I didn't see this mentioned in the Zope dox, and it had completely slipped my mind. Of course, now that I've found the problem, I see where its mentioned in the ORB Documentation.
Someone might want to highlight this somewhere (a FAQ?). I was thinking a Product "Checklist" would be very useful. Also, examples of Folderish items...
Good idea. Note that if Bobo debug mode is enabled, then the error message would have highlighted this. Unfortunately, the ZopeHTTPServer doesn't use debug mode by default. We should probably try to figure out a way to do this. Jim -- Jim Fulton mailto:jim@digicool.com Technical Director (540) 371-6909 Python Powered! Digital Creations http://www.digicool.com http://www.python.org Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
Jim> Gabe Wachob wrote: >> Someone might want to highlight this somewhere (a FAQ?). I was thinking >> a Product "Checklist" would be very useful. Also, examples of Folderish >> items... Jim> Unfortunately, the ZopeHTTPServer doesn't use debug mode by Jim> default. We should probably try to figure out a way to do this. Since ZopeHTTPServer is (at least) used as the fastest way to get people started publishing with Zope, I think it makes sense to enable debug mode by default. Skip Montanaro | Mojam: "Uniting the World of Music" http://www.mojam.com/ skip@calendar.com | Musi-Cal: http://concerts.calendar.com/ 518-372-5583
participants (3)
-
Gabe Wachob -
Jim Fulton -
skip@calendar.com