From davor.geci at gmail.com Tue Oct 2 09:31:04 2018 From: davor.geci at gmail.com (Davor Geci) Date: Tue, 2 Oct 2018 15:31:04 +0200 Subject: [python-win32] COM: Event handler for Virtual Forms Message-ID: Hello, I would like to catch events that Virtual Form control is firing. For now I have managed to open it and interact with the controls that are on this Virtual Forms. The code and the control are here: https://www.virtual-forms.com/python-experts-i-need-your-expertise/ Do you have any ideas how to use the event handler? Thanks, Davor ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From mastro1959 at yahoo.it Tue Oct 2 13:32:01 2018 From: mastro1959 at yahoo.it (mastro59) Date: Tue, 2 Oct 2018 10:32:01 -0700 (MST) Subject: [python-win32] wincom32.client problem? Message-ID: <1538501521914-0.post@n6.nabble.com> I ahve been trying to communicate with an Instrument GUI using python and a COM Object. This is quite simple using wincom32, but somethind with this client required additional extension not needed in other lunguages. I wander id someone here has experience and can explain how to solve this.in VBS, PAscal and C# the commands are quite simple, after creting the object in VBS: set app = CreateObject("LeCroy.XStreamDSO")in Python is similar:import win32com.clientapp=win32com.client.Dispatch("LeCroy.XStreamDSO") done this the object I can use is "app"the commands are in VBS:app.Acquisition.Horizontal.MaxSamplesOrRateDownapp.Acquisition.Horizontal.MaxSamplesOrRateUpapp.Acquisition.TriggerMode = "single"app.Measure.ClearSweepsin Python I have to add .ActNow() to make them work to some of these commands, and I do not understand why, I will have to use:app.Acquisition.Horizontal.MaxSamplesOrRateDown.ActNow()app.Acquisition.Horizontal.MaxSamplesOrRateUp.ActNow()app.Acquisition.TriggerMode = "single"app.Measure.ClearSweeps.ActNow()In C#(Visualstudio 2017) and Pascal (Lazarus) I do not have this problem, only in Python.can someone help?thanks -- Sent from: http://python.6.x6.nabble.com/Python-python-win32-f1948913.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From sairamk1989 at gmail.com Tue Oct 9 11:03:28 2018 From: sairamk1989 at gmail.com (Sai Ram) Date: Tue, 9 Oct 2018 11:03:28 -0400 Subject: [python-win32] Exception '-2147221164' while using win32com.client.Dispatch("SAPI.SpVoice") Message-ID: Hi, We are using "win32com.client.Dispatch("SAPI.SpVoice")" for TTS to our target device from a Windows 7 desktop. We are seeing many of these exceptions: "Exception '-2147221164'". Is there a fix for this? Basically, wanted to know the reason for this exception and the fix for this. Thanks, Sairam K -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Wed Oct 10 02:39:14 2018 From: timr at probo.com (Tim Roberts) Date: Tue, 9 Oct 2018 23:39:14 -0700 Subject: [python-win32] Exception '-2147221164' while using win32com.client.Dispatch("SAPI.SpVoice") In-Reply-To: References: Message-ID: <77B508FE-D9FC-4110-976A-E8BF65DED371@probo.com> On Oct 9, 2018, at 8:03 AM, Sai Ram wrote: > > We are using "win32com.client.Dispatch("SAPI.SpVoice")" for TTS to our target device from a Windows 7 desktop. We are seeing many of these exceptions: "Exception '-2147221164'". > Is there a fix for this? Basically, wanted to know the reason for this exception and the fix for this. COM exceptions are listed in hex. -2147221164 is 0x80040154, which is E_CLASSNOTREG. Have you installed SAPI 5.1? It's not built-in. ? Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Wed Oct 10 12:51:25 2018 From: timr at probo.com (Tim Roberts) Date: Wed, 10 Oct 2018 09:51:25 -0700 Subject: [python-win32] Exception '-2147221164' while using win32com.client.Dispatch("SAPI.SpVoice") In-Reply-To: References: <77B508FE-D9FC-4110-976A-E8BF65DED371@probo.com> Message-ID: <76e620d5-770e-0bef-465d-aebf946b8eaa@probo.com> Sai Ram wrote: > > ? ?I really did not know that this value would make difference. > Apologies for the vague question. The actual exception is "-2147352567". That's 0x80020009, or DISP_E_EXCEPTION.? That's really telling you to refer to the other code for the details. > Also, we have around 5000 test scripts. Out of these, around 300 test > scripts fails with this exception. So, I do not doubt any system > issues here. Did you actually install the SAPI SDK?? Do all 5,000 of the scripts use SpVoice?? Do the 300 that fail use some particular subset?? Are they all either 32-bit or 64-bit apps? -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3980 bytes Desc: S/MIME Cryptographic Signature URL: From timr at probo.com Wed Oct 10 17:35:34 2018 From: timr at probo.com (Tim Roberts) Date: Wed, 10 Oct 2018 14:35:34 -0700 Subject: [python-win32] Exception '-2147221164' while using win32com.client.Dispatch("SAPI.SpVoice") In-Reply-To: References: <77B508FE-D9FC-4110-976A-E8BF65DED371@probo.com> <76e620d5-770e-0bef-465d-aebf946b8eaa@probo.com> Message-ID: <7639308C-2417-45B5-BBC8-201F065D0A4D@probo.com> On Oct 10, 2018, at 1:25 PM, Sai Ram wrote: > > We use Nuance's Vocalizer Expressive for voice and sapi5.dll. Also, we modify the "Windows registry" to refer to this dll. What does that mean? Ordinarily, you would just register the DLL with regsvr32 once and for all. Are you making registry changes on the fly? ? Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From sairamk1989 at gmail.com Wed Oct 10 09:36:12 2018 From: sairamk1989 at gmail.com (Sai Ram) Date: Wed, 10 Oct 2018 09:36:12 -0400 Subject: [python-win32] Exception '-2147221164' while using win32com.client.Dispatch("SAPI.SpVoice") In-Reply-To: <77B508FE-D9FC-4110-976A-E8BF65DED371@probo.com> References: <77B508FE-D9FC-4110-976A-E8BF65DED371@probo.com> Message-ID: Hello Tim, I really did not know that this value would make difference. Apologies for the vague question. The actual exception is "-2147352567". Also, we have around 5000 test scripts. Out of these, around 300 test scripts fails with this exception. So, I do not doubt any system issues here. Thank you for your response. Appreciate it. -Sairam K On Wed, Oct 10, 2018 at 2:49 AM Tim Roberts wrote: > On Oct 9, 2018, at 8:03 AM, Sai Ram wrote: > > > We are using "win32com.client.Dispatch("SAPI.SpVoice")" for TTS to our > target device from a Windows 7 desktop. We are seeing many of these > exceptions: "Exception '-2147221164'". > Is there a fix for this? Basically, wanted to know the reason for this > exception and the fix for this. > > > COM exceptions are listed in hex. -2147221164 is 0x80040154, which is > E_CLASSNOTREG. Have you installed SAPI 5.1? It's not built-in. > ? > Tim Roberts, timr at probo.com > Providenza & Boekelheide, Inc. > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sairamk1989 at gmail.com Wed Oct 10 16:25:10 2018 From: sairamk1989 at gmail.com (Sai Ram) Date: Wed, 10 Oct 2018 16:25:10 -0400 Subject: [python-win32] Exception '-2147221164' while using win32com.client.Dispatch("SAPI.SpVoice") In-Reply-To: <76e620d5-770e-0bef-465d-aebf946b8eaa@probo.com> References: <77B508FE-D9FC-4110-976A-E8BF65DED371@probo.com> <76e620d5-770e-0bef-465d-aebf946b8eaa@probo.com> Message-ID: We use Nuance's Vocalizer Expressive for voice and sapi5.dll. Also, we modify the "Windows registry" to refer to this dll. This issue is seen randomly. The failures do not belong to any sub-set. The very next test script in the same set-up would fail. -Sairam K On Wed, Oct 10, 2018 at 12:51 PM Tim Roberts wrote: > Sai Ram wrote: > > > > I really did not know that this value would make difference. > > Apologies for the vague question. The actual exception is "-2147352567". > > That's 0x80020009, or DISP_E_EXCEPTION. That's really telling you to > refer to the other code for the details. > > > > Also, we have around 5000 test scripts. Out of these, around 300 test > > scripts fails with this exception. So, I do not doubt any system > > issues here. > > Did you actually install the SAPI SDK? Do all 5,000 of the scripts use > SpVoice? Do the 300 that fail use some particular subset? Are they all > either 32-bit or 64-bit apps? > > -- > Tim Roberts, timr at probo.com > Providenza & Boekelheide, Inc. > > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > https://mail.python.org/mailman/listinfo/python-win32 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sairamk1989 at gmail.com Thu Oct 11 08:51:59 2018 From: sairamk1989 at gmail.com (Sai Ram) Date: Thu, 11 Oct 2018 08:51:59 -0400 Subject: [python-win32] Exception '-2147221164' while using win32com.client.Dispatch("SAPI.SpVoice") In-Reply-To: <7639308C-2417-45B5-BBC8-201F065D0A4D@probo.com> References: <77B508FE-D9FC-4110-976A-E8BF65DED371@probo.com> <76e620d5-770e-0bef-465d-aebf946b8eaa@probo.com> <7639308C-2417-45B5-BBC8-201F065D0A4D@probo.com> Message-ID: No. Not really. We don't make registry changes on the fly. We do register the DLL with regvr32 once and for all. That's the reason we find it strange. This error is absolutely random and there are no changes in the set-up when this error is observed. All the 5000 test scripts are split into different test suites. A test suite might contain 30 test scripts (on an average). This error is so random, that will be seen in one or more test scripts while we are executing. We figured out that this is because of win32com. We do not have any clues further. -Sairam K On Wed, Oct 10, 2018 at 5:35 PM Tim Roberts wrote: > On Oct 10, 2018, at 1:25 PM, Sai Ram wrote: > > > > We use Nuance's Vocalizer Expressive for voice and sapi5.dll. Also, we > modify the "Windows registry" to refer to this dll. > > What does that mean? Ordinarily, you would just register the DLL with > regsvr32 once and for all. Are you making registry changes on the fly? > ? > Tim Roberts, timr at probo.com > Providenza & Boekelheide, Inc. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ludwig.bloder at avl.com Mon Oct 15 07:44:31 2018 From: ludwig.bloder at avl.com (Bloder, Ludwig AVL/AT) Date: Mon, 15 Oct 2018 11:44:31 +0000 Subject: [python-win32] makepy Promlem? pywintypes.com_error: (-2147352573, 'Member not found.', None, None) Message-ID: <1aa0b703f9eb41e89e82f03da08e20e8@ATGRZSW1694.avl01.avlcorp.lan> I have defined an MS COM interface which I want to access from within Python. I therefore have created a wrapper using the 'makepy' utility that come along with the win32com package. [ object, dual, ... ] interface IPuma7ScriptContextEx : IDispatch { : [id(21), helpstring("method GetScriptObject")] HRESULT GetScriptObject([in] long ContextId, [in] BSTR ModuleName, [out, retval] IPuma7Script ** ppPuma7Script); [id(22), helpstring("method GetScriptDispatch")] HRESULT GetScriptDispatch([in] long ContextId, [in] BSTR ModuleName, [out, retval] IDispatch ** ppPuma7ScriptDispatch); : }; As it now turns out, the generated Python wrapper seems not to work for all member functions of the interface. It does work for function 'GetScriptObject': >>>ScriptContextEx.GetScriptObject(0,"User") < win32com.gen_py.AVL PUMA7 Object Model 1.0 Type Library.IPuma7Script instance at 0x59539888> But it does not work for 'GetScriptDispatch': >>>ScriptContextEx.GetScriptDispatch(0,"User") Traceback (most recent call last): File "", line 1, in File "C:\Python37-32\lib\site-packages\win32com\gen_py\27E37C67-3AE4-11D5-A53E-0004AC2566F4x0x1x0\IPuma7ScriptContextEx.py", line 42, in GetScriptDispatch , ModuleName) pywintypes.com_error: (-2147352573, 'Member not found.', None, None) The only apparent difference between these two functions is that the first one (that works) returns an IPuma7Script interface pointer which is also declared in the respective TLB file whereas the second one returns a 'standard' IDispatch interface pointer. Is there a solution some around already or at least a workaround? Any help is highly welcome. Thanks and best regards Ludwig ____________________________________________________________________________ AVL List GmbH, Firmensitz: Graz, Firmenbuchnummer: FN 53507M, Landesgericht fuer ZRS Graz -------------- next part -------------- An HTML attachment was scrubbed... URL: From Burt_Lehman at hotmail.com Sun Oct 28 19:53:30 2018 From: Burt_Lehman at hotmail.com (Burt) Date: Sun, 28 Oct 2018 23:53:30 +0000 Subject: [python-win32] System.Decimal TypeError Message-ID: Hi, I have a list of tuples containing "System.Decimal" objects (from a AdomdClient cellset). When I try to move that list to Excel using win32com.client I get the following error: "TypeError: Currency object must be a Decimal instance (got Decimal)". Other AdomdClient cellsets I pull return 'float' objects and those get moved to Excel fine. Is there a problem converting "System.Decimal" to "VT_Decimal" (or whatever com requires)? Thank you for any help you can provide! -------------- next part -------------- An HTML attachment was scrubbed... URL: