[Zope-dev] Curious Problem

robert robert@redcor.ch
Fri, 25 Apr 2003 18:30:06 +0200


are you sure Zope does use the same python as your standalone module.
Normaly zope uses its onwn python which is in YOURZOPE/bin/python (I think)

Robert
Am Freitag, 25. April 2003 16:13 schrieb stuffduff:
> 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
>
>
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://mail.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope )

=2D-=20
mit freundlichen Gr=FCssen

Robert Rottermann
www.redCOR.ch