Tone, thanks for the pointer. As it turns out, my problem was much more basic. To recap, I was following the document: http://www.zope.org/Documentation/Reference/ObjectPublishingIntro This document covers wonderful stuff (DTML, Persistence, etc.) with perfectly bare bones examples. Unfortunately, the Persistence section fails to mention that certain code needs to be installed in the Shared directory (which I'd never heard of as I'm learning Zope) in order to work. I spent ThFr sleuthing this. Yesterday, I began to suspect the docs when I installed Zope 1.10.3 just to get the example to run and it still didn't run. Creepers. So then I went in search of other docs and found: http://www.zope.org/Documentation/Reference/ExternalMethods which specifically mentions, "Zope provides a convenient solution for packaging classes which you wish to use in External Methods. This solution is the 'Shared' package, located in 'lib/python/Shared'." Once I figured that out, I was able to duplicate the example using Zope2 and a few different headers (i.e., not hard and kind of anti-climactic after knocking my head against the wall for two days). I would suggest adding the 'lib/python/Shared' explanation to the ObjectPublishingIntro. I also think it would be very worthwhile having several Samples directories in the appropriate places with working examples of the basic Zope functionality. The examples from the ObjectPublishingIntro would be great for these directories. This way, when a newbie does a text search for some Zope keyword of special interest (e.g., Persistence), they can automatically find useful, simple, working, up-to-date examples. I now have persistence and am ready to keep building my first Zope project. Cheers, = Joe = Tony.McDonald@newcastle.ac.uk wrote:
Joe, I'm not 100% certain, but I think things *have* changed in Zope2. There's some messages from Jim and Ty in Zope-Dev digest Vol 1 #92 about BoboPos and Persistence and Zope2. Ominously, they're titled "Dont import from BoboPOS"
Sorry I can't be definite on this. Tone
Hi,
I'm using Zope2 and am trying to get Persistence working for the first time by creating an object store. I'm using the documentation:
http://www.zope.org/Documentation/Reference/ObjectPublishingIntro
which has a chunk of code to do a very basic store on a Person. I've tried this code both within and without Zope with no success. I'm wondering whether
1. The code (appended) doesn't work for Zope2? When ExternalMethod->Add'ed into Zope, I get:
Zope Error
Zope has encountered an error while publishing this resource.
exceptions.AttributeError
Sorry, a Zope error occurred.