Re: [python-win32] com error

2005-11-08 Thread Graham Bloice
Traceback (most recent call last): File C:\Python22\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py, line 310, in RunScript exec codeObject in __main__.__dict__ File C:\Deneb\BHSS\Projects\AKL_0502\VC\PythonApplications\OPCWriteTestor.py, line 103, in ? Sensor(1)

[python-win32] Reading custom output parameters from LabVIEW/Acti veX

2005-11-08 Thread Ola Rylow
By using pythoncom.Missing, which I read about in another thread, I got a LabVIEW error message instead: return self._get_good_object_( pywintypes.com_error: (-2147352567, 'Exception occurred.', (5002, 'LabVIEW', 'LabVIEW : paramVals type mismatch. Expected 1D array of variants.', None, 0, 0),

Re: [python-win32] com error

2005-11-08 Thread Michael Johnstone
--- Graham Bloice [EMAIL PROTECTED] wrote: Traceback (most recent call last): File C:\Python22\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py, line 310, in RunScript exec codeObject in __main__.__dict__ File

Re: [python-win32] Reading custom output parameters fromLabVIEW/Acti veX

2005-11-08 Thread Mark Hammond
So the new question is: how do you create a 1D array of variants in python? From what I've read this is normally handled behind the scenes by PythonCom...? That's correct - just pass a list or tuple. However, that is rarely the complete answer - what *type* of variant should be in the array?

Re: [python-win32] com error

2005-11-08 Thread Michael Johnstone
--- Mark Hammond [EMAIL PROTECTED] wrote: C:\Python22\Lib\site-packages\win32com\client\__init__.py, line 446, in _ApplyTypes_ return self._get_good_object_( com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2147024809), None) The second value in that

Re: [python-win32] com error

2005-11-08 Thread Mark Hammond
Hi Mark Not sure if I got what you suggested correct. The method I am trying to use is defined as: def SyncWrite(self, NumItems=defaultNamedNotOptArg, ServerHandles=defaultNamedNotOptArg, Values=defaultNamedNotOptArg), Errors=pythoncom.Missing): There appears to be an extra close paren