[python-win32] Python win32com and iTunes
Test Drive
testdrive6 at gmail.com
Wed Oct 11 23:00:27 CEST 2006
Hi Tim,
Which version of iTunes you are using?
Thanks
On 10/11/06, Tim Roberts <timr at probo.com> wrote:
>
> Test Drive wrote:
>
> > Hi All,
> >
> > I am trying to use win32com with iTunes (version 7.0.1.8
> > <http://7.0.1.8>). However it seems like I am missing something and I
> > am clueless about that.
> >
> > <code>
> > import win32com.client as wc
> > import pythoncom,sys
> >
> > app=wc.Dispatch('iTunes.Application')
> > mainPl=app.LibraryPlaylist
> >
> > print ">>>>>>>>>>>>>> Dir <<<<<<<<<<<<<<<<<<"
> > print dir(mainPl)
> >
> > print ">>>>>>>>>>>>> Help On PlayFirstTrack <<<<<<<<<<<<<"
> > print help(mainPl.PlayFirstTrack)
> >
> > mainPl.PlayFirstTrack ()
> > sys.exit(-1)
> > </code>
> >
> > <output>
> > ... Start playing the first track in this playlist.
> >
> > None
> > Traceback (most recent call last):
> > File "iTunesmin.py", line 13, in ?
> > mainPl.PlayFirstTrack()
> > File
> >
> "c:\python24\lib\site-packages\win32com\gen_py\9E93C96F-CF0D-43F6-8BA8-B8
> > 07A3370712x0x1x8\IITLibraryPlaylist.py", line 80, in PlayFirstTrack
> > return self._oleobj_.InvokeTypes(1610809345, LCID, 1, (24, 0), (),)
> > pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None,
> > None, None,
> > 0, -2147418113), None)
>
>
> Hmmm, -2147418113 is 0x8000FFFF, which is the rather catchall error
> E_UNEXPECTED. It generally means you did things out of order. Is it
> possible that it needs more initialization before launching the first
> track?
>
> --
> Tim Roberts, timr at probo.com
> Providenza & Boekelheide, Inc.
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20061012/fcfedb78/attachment.html
More information about the Python-win32
mailing list