Re: [python-win32] Com error invalid class string

2016-02-16 Thread Tim Roberts
jakkampudikiranku...@eaton.com wrote:
>
>
>  
>
> I am trying to run a python application which is leaving trackback as
> shown below .
>
> I am using windows -7 32 bit O.S,python 2.4.4,pywin32 214 
>
> ...
>
> Can anyone help in figuring out the issue?
>

I don't know how you can expect anyone to help when you don't show the
code.  The issue is very clear -- the class string in the call to
Dispatch is not a registered class.  So, go look up what ID_SETUP_DONGLE
is, figure out which DLL is the server for that class, and register it.

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

___
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32


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)
   File
 C:\Deneb\BHSS\Projects\AKL_0502\VC\PythonApplications\OPCWriteTestor.py,
 line 100, in Sensor
 grpPinWheel.SyncWrite(num, sh, listval, errors)#,
 CID, SID)
   File
 C:\Python22\Lib\site-packages\win32com\gen_py\F5F1FC84-DB0B-11D3-
 883B-0050041DD057x0x1x0.py,
 line 302, in SyncWrite
 , ServerHandles, Values, Errors)
   File
 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)



Have you set errors to be an empty list before the call ?

Graham

___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


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
 

C:\Deneb\BHSS\Projects\AKL_0502\VC\PythonApplications\OPCWriteTestor.py,
  line 103, in ?
  Sensor(1)
File
 

C:\Deneb\BHSS\Projects\AKL_0502\VC\PythonApplications\OPCWriteTestor.py,
  line 100, in Sensor
  grpPinWheel.SyncWrite(num, sh, listval,
 errors)#,
  CID, SID)
File
 

C:\Python22\Lib\site-packages\win32com\gen_py\F5F1FC84-DB0B-11D3-
  883B-0050041DD057x0x1x0.py,
  line 302, in SyncWrite
  , ServerHandles, Values, Errors)
File
 

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)
 
 
 
 Have you set errors to be an empty list before the
 call ?
 
 Graham
 
 

Yes I have tried errors as an empty list and array
without success. I have also tried to use
pythoncom.missing as this argument.

cheers
Mike



 
Do you Yahoo!? 
The New Yahoo! Movies: Check out the Latest Trailers, Premiere Photos and full 
Actor Database. 
http://au.movies.yahoo.com
___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


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 error tuple is the error
 code provided by the
 object.  It didn't bother to fill in a message, but
 we can get one if it is
 a standard COM error:
 
  pythoncom.GetScodeString(-2147024809)
 'The parameter is incorrect.'
 
 
 I'm not sure why it is throwing that specific error.
  I guess it may be
 default params.  Try passing explicit values for
 all params - explicitly
 pass pythoncom.Missing for ones you don't know the
 correct value for (the
 win32com framework will currently be passing
 pythoncom.Empty for them - the
 difference is subtle, but some objects are very
 picky about which one you
 choose (basically, 'Empty' means an empty param will
 be supplied to the
 object, whereas 'Missing' will tell pythoncom to not
 present that argument
 at all))
 
 Mark
 
 
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):

I have tried calling this different ways:
grpPinWheel.SyncWrite(NumItems=num, ServerHandles=sh,
Values=listval, Errors=errors)
grpPinWheel.SyncWrite(NumItems=num, ServerHandles=sh,
Values=listval, Errors=pythoncom.Missing)

I still get the same error.  I have also tried using
arrays and lists for the variables but these dont
seem to make a difference

cheers
michael



 
Do you Yahoo!? 
Listen to over 20 online radio stations and watch the latest music videos on 
Yahoo! Music. 
http://au.launch.yahoo.com
___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


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 there...

 I have tried calling this different ways:
 grpPinWheel.SyncWrite(NumItems=num, ServerHandles=sh,
 Values=listval, Errors=errors)
 grpPinWheel.SyncWrite(NumItems=num, ServerHandles=sh,
 Values=listval, Errors=pythoncom.Missing)

Try pythoncom.Empty too.  You should find from the decls at the top of the
generated file that 'defaultNamedNotOptArg' is actually pythoncom.Empty -
and that is what I assumed would be used for 'Errors'.  It appears however
that pythoncom.Missing is *already* being used for that param.

Sadly though, this may be a red herring, and the problem may be related to
the types of the other params.  Without more useful info from the object
itself, it is very hard to speculate.

Mark

___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32