[Zope] APE/custom product question
Adam J Smith
ajs17 at cornell.edu
Wed Nov 3 14:41:53 EST 2004
I have started experimenting with APE and I think its great. I am just
having a small problem saving a class of objects from a custom product I
wrote. I suspect the ultimate answer is to write my own serializer, but
before I go too far in that direction, I thought I would see if anyone
could point me to a lazier solution.
In this product, most of my classes subclass the OrderedFolder object and
use the PropertyManager, so the default APE filesystem configuration seems
to handle them perfectly. In one case though, I subclass both
OrderedFolder and OFS.Image (and in another case, both OrderedFolder and
OFS.File). This works fine with plain-old ZODB, but generates the
following error when I use APE:
---
Traceback (innermost last):
Module ZPublisher.Publish, line 100, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 40, in call_object
Module Products.TutorialAuthor.taFile, line 68, in manage_addtaFile
Module Products.TutorialAuthor.taFile, line 131, in handleUploadedFile
Module OFS.Image, line 434, in manage_upload
Module OFS.Image, line 483, in _read_data
Module ZODB.Transaction, line 233, in commit
Module ZODB.Transaction, line 348, in _commit_objects
Module apelib.zodb3.connection, line 287, in commit
Module apelib.zodb3.connection, line 411, in _handle_unmanaged
AssertionError
---
I suspect that APE is trying to save it as a folder, and doesn't expect
the file data, or something like that. (In the class spec, I inherit from
OrderedFolder first, then Image.) I am double-checking my code just to
make sure that I am not doing something wrong that is just now coming to
light, but otherwise, I am wondering how much hope there is for finding a
way to make the default filesystem configuration work.
I'm using Suse 9.1, Zope2.7.0, Python 2.3.3, and Ape 1.0. (Would
Zope 2.7.3, Python 2.3.4 make a difference?)
Thanks in advance for any guidance...
____________________________
adam smith
ajs17 at cornell.edu
More information about the Zope
mailing list