[Zope] Curious Problem

stuffduff stuffduff@cox.net
Fri, 25 Apr 2003 07:50:00 -0500


Hi,

I have a python external method which reads from an external database,
unpickles a class object, and concatenates some of the object's properties
into a string which is returned by the external method.  The class
definition is included in the module.

When I run it from the linux prompt in the Extensions directory it behaves
exactly as it should. The class is successfully unpickled, the properties
are read and the string is returned.

However, when I set it up as an external method and call it I get the
infamous:

Error Type: SystemError
Error Value: Failed to import class MyObject from module __main__

>From my perspective Zope should be 'blissfully unaware' of the existence of
the class or the instantiation of the object.  Since the object is only
accessed in the external method, the module contains the class definition,
and only a string is returned, why is this happening?

What am I missing here?

Platform: Red Hat 7.3, Python 2.1.3, Zope 2.51

Curious,

Sean

work: swduffy@unmc.edu
home: stuffduff@cox.net