On 9 November 2012 10:32, Thomas Heller <thel...@ctypes.org> wrote:

> Am 09.11.2012 10:33, schrieb Joshua Arnott:
>  > Hi everyone,
> > I'm getting an error from comtypes when I try to access collections in a
> > specific software package (Aquator - http://www.oxscisoft.com/aquator/).
> > The same approach works correctly from VBA, or using the win32com
> > module, but I receive the error below from comtypes:
> >  >>> Database.Profiles
> > <POINTER(_IProfiles) ptr=0x2658e4 at ec74e0>
> >  >>> Database.Profiles.Count
> > 1
> >  >>> Database.Profiles.Item(1)
> > Traceback (most recent call last):
> >    File "<stdin>", line 1, in <module>
> >    File "C:\Program Files\Pythonxy\Pythonxy
> > 2.7\Python27\lib\site-packages\comtyp
> > es\__init__.py", line 604, in call_with_inout
> >      rescode = func(self_, *args, **kw)
> > _ctypes.COMError: (-2146828279, None, (u'Subscript out of range',
> > u'IAquator', N
> > one, 1000009, None))
> > I can navigate similar structures using comtypes (e.g.
> > Excel.ActiveWorkbook.Worksheets) without any problems, so it's something
> > application specific. The Count method returns the correct value, but
> > the Item method always returns 'Subscript out of range'. Can anyone help
> > me with this?
>
> Can it be that this particular object uses zero-based indexing instead
> of one-based?
>
> Does Database.Profiles.Item(0) work?
>
> Does [x for x in Database.Profiles] work?
>
> Thomas


Hi Thomas,

Both commands result in the same "Subscript out of range" error.

Josh
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
comtypes-users mailing list
comtypes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/comtypes-users

Reply via email to