Re: [Zope] Method invocation.
Antonio Costa writes:
This is a multi-part message in MIME format. --------------0FCBD795A66219CE28E5CE35 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Please, do not post MIME messages! .... File SearchObject.py:
manage_addSearchObjectForm = DTMLFile('dtml/searchObjectManage', globals())
def manage_prevAddSearchObject(self): "Criacao de um objecto SearchObject"
# print 'Ola' + str(self) # global manage_addSearchObjectForm ##### Desperate attempt ##### # import SearchObject ##### Another one ##### return manage_addSearchObjectForm() ##### Error in this line. .... Error Type: AttributeError Error Value: aq_parent You strip the context from "manage_addSearchObjectForm".
Try: return manage_addSearchObjectForm(self) Dieter
Does anyone know how to force a Zope product to be single threaded within Zope? TIA, Tim tim@carbonwave.com
I am using Com Object to pull in an ActiveX control for Windows Media Encoder. I am experiencing some strange behaviours and crashes, which I believe has to do with Zope's threading model conflicting in subtle ways with Com's. So, I am thinking, that if I turn off the threading on this one object in Zope, it might solve my problem. I don't really want more than one access to the Com object happening at a time anyway, so turning the threading off shouldn't cause a loss of desireable functionality in that sense. Unless it causes problems within Zope. I remember there being a package that can be pulled into the product to do this, but I can't find it now. Do you have any advice? Thanks, Tim
-----Original Message----- From: Chris Withers [mailto:chrisw@nipltd.com] Sent: Wednesday, March 07, 2001 2:05 AM To: Tim Lakey Cc: zope@zope.org Subject: Re: [Zope] Make a Zope object single threaded
Tim Lakey wrote:
Does anyone know how to force a Zope product to be single
threaded within
Zope?
Out of curiosity, why do you want to? :-)
Chris
Tim, Have you called the pythoncom.CoInitialize() method before using your COM object? This is required to use COM objects relaibly from Zope. hth Phil phil.harris@zweb.co.uk ----- Original Message ----- From: "Tim Lakey" <tim@carbonwave.com> To: "Chris Withers" <chrisw@nipltd.com> Cc: <zope@zope.org> Sent: Wednesday, March 07, 2001 6:50 PM Subject: RE: [Zope] Make a Zope object single threaded
I am using Com Object to pull in an ActiveX control for Windows Media Encoder. I am experiencing some strange behaviours and crashes, which I believe has to do with Zope's threading model conflicting in subtle ways with Com's. So, I am thinking, that if I turn off the threading on this one object in Zope, it might solve my problem. I don't really want more than one access to the Com object happening at a time anyway, so turning the threading off shouldn't cause a loss of desireable functionality in that sense. Unless it causes problems within Zope.
I remember there being a package that can be pulled into the product to do this, but I can't find it now.
Do you have any advice?
Thanks, Tim
-----Original Message----- From: Chris Withers [mailto:chrisw@nipltd.com] Sent: Wednesday, March 07, 2001 2:05 AM To: Tim Lakey Cc: zope@zope.org Subject: Re: [Zope] Make a Zope object single threaded
Tim Lakey wrote:
Does anyone know how to force a Zope product to be single
threaded within
Zope?
Out of curiosity, why do you want to? :-)
Chris
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
I had similar thread problems with ZJetDA. I hacked around it by loading a new instance of the COM object for each thread. You can look at my code as an example. I'm sure there are much better solutions, though. http://www.zope.org/Members/jfarr/Products/ZJetDA --jfarr ----- Original Message ----- From: "Phil Harris" <phil.harris@zope.co.uk> To: "Tim Lakey" <tim@carbonwave.com>; "Chris Withers" <chrisw@nipltd.com> Cc: <zope@zope.org> Sent: Wednesday, March 07, 2001 1:29 PM Subject: Re: [Zope] Make a Zope object single threaded
Tim,
Have you called the pythoncom.CoInitialize() method before using your COM object?
This is required to use COM objects relaibly from Zope.
hth
Phil phil.harris@zweb.co.uk
----- Original Message ----- From: "Tim Lakey" <tim@carbonwave.com> To: "Chris Withers" <chrisw@nipltd.com> Cc: <zope@zope.org> Sent: Wednesday, March 07, 2001 6:50 PM Subject: RE: [Zope] Make a Zope object single threaded
I am using Com Object to pull in an ActiveX control for Windows Media Encoder. I am experiencing some strange behaviours and crashes, which I believe has to do with Zope's threading model conflicting in subtle ways with Com's. So, I am thinking, that if I turn off the threading on this one object in Zope, it might solve my problem. I don't really want more than one access to the Com object happening at a time anyway, so turning the threading off shouldn't cause a loss of desireable functionality in that sense. Unless it causes problems within Zope.
I remember there being a package that can be pulled into the product to do this, but I can't find it now.
Do you have any advice?
Thanks, Tim
-----Original Message----- From: Chris Withers [mailto:chrisw@nipltd.com] Sent: Wednesday, March 07, 2001 2:05 AM To: Tim Lakey Cc: zope@zope.org Subject: Re: [Zope] Make a Zope object single threaded
Tim Lakey wrote:
Does anyone know how to force a Zope product to be single
threaded within
Zope?
Out of curiosity, why do you want to? :-)
Chris
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Phil, Yes, we are calling CoInitializeEx. We also got Zope up and running under Python 2.0, and that seemed to help some too. Tim
-----Original Message----- From: Phil Harris [mailto:phil.harris@zope.co.uk] Sent: Wednesday, March 07, 2001 1:30 PM To: Tim Lakey; Chris Withers Cc: zope@zope.org Subject: Re: [Zope] Make a Zope object single threaded
Tim,
Have you called the pythoncom.CoInitialize() method before using your COM object?
This is required to use COM objects relaibly from Zope.
hth
Phil phil.harris@zweb.co.uk
----- Original Message ----- From: "Tim Lakey" <tim@carbonwave.com> To: "Chris Withers" <chrisw@nipltd.com> Cc: <zope@zope.org> Sent: Wednesday, March 07, 2001 6:50 PM Subject: RE: [Zope] Make a Zope object single threaded
I am using Com Object to pull in an ActiveX control for Windows Media Encoder. I am experiencing some strange behaviours and crashes, which I believe has to do with Zope's threading model conflicting in subtle ways with Com's. So, I am thinking, that if I turn off the threading on this one object in Zope, it might solve my problem. I don't really want more than one access to the Com object happening at a time anyway, so turning the threading off shouldn't cause a loss of desireable functionality in that sense. Unless it causes problems within Zope.
I remember there being a package that can be pulled into the product to do this, but I can't find it now.
Do you have any advice?
Thanks, Tim
-----Original Message----- From: Chris Withers [mailto:chrisw@nipltd.com] Sent: Wednesday, March 07, 2001 2:05 AM To: Tim Lakey Cc: zope@zope.org Subject: Re: [Zope] Make a Zope object single threaded
Tim Lakey wrote:
Does anyone know how to force a Zope product to be single
threaded within
Zope?
Out of curiosity, why do you want to? :-)
Chris
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (5)
-
Chris Withers -
Dieter Maurer -
Jonothan Farr -
Phil Harris -
Tim Lakey