|
List Info
Thread: iTunes COM using Python win32
|
|
| iTunes COM using Python win32 |

|
2007-02-01 13:43:22 |
|
Hi,
The following code works perfectly well on one of my machines, but gives me an error on another:
iTunesApp = WScript.CreateObject("iTunes.Application");
pl = iTunesApp.LibraryPlaylist tracks = pl.Tracks myTrack = tracks[0]
myNewList = iTunesApp.CreatePlaylist("My New List") myNewList.AddTrack(myTrack)
I get the following error message:
Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
C:AldensrcAppsPhatPodtest.pys(10, 0) Python ActiveX Scripting Engine: Traceback (most recent call last): File "<Script Block >", line 10, in ? myNewList.AddTrack(myTrack) File "C:Python24Libsite-packageswin32comclient__init__.py", line 454, in __getattr__ raise AttributeError, "'%s' object has no attribute '%s'" % (repr(self), attr) AttributeError: '<win32com.gen_py.iTunes 1.8 Type Library.IITPlaylist instance at 0x29470352>' object has no attribute 'AddTrack'
Does anyone know why one machine would work, while another wouldn't? Improper machine setup, maybe? I've followed every step twice in setup.
Thanks,
Li
--
|
| Re: iTunes COM using Python win32 |

|
2007-02-01 20:16:31 |
|
Is it running the same version of itunes?
On 2/1/07, Mark Hammond < mhammond skippinet.com.au">mhammond skippinet.com.au> wrote:
I'd
guess that one box has had makepy run for that type-library, but the other
hasn';t. Look into using the win32com.client.gencache module to
programatically generate makepy support, and it should then happen everywhere
you run it.
HTH,
Mark
-----Original Message----- From:
python-win32-bounces python.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">python-win32-bounces python.org [mailto: python-win32-bounces python.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
python-win32-bounces python.org]On
Behalf Of Alden Lavizzo Sent: Friday, 2 February 2007 6:43
AM To: python-win32 python.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">python-win32 python.org Subject: [python-win32]
iTunes COM using Python win32
Hi,
The following code works perfectly well on one of my machines, but gives
me an error on another:
iTunesApp =
WScript.CreateObject("iTunes.Application");
pl =
iTunesApp.LibraryPlaylist tracks = pl.Tracks myTrack =
tracks[0]
myNewList =
iTunesApp.CreatePlaylist("My New
List") myNewList.AddTrack(myTrack)
I get the following error message:
Microsoft
(R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation
1996-2001. All rights reserved.
C:AldensrcAppsPhatPodtest.pys(10, 0) Python ActiveX Scripting
Engine: Traceback (most recent call last): File "<Script Block
>", line 10, in ?
myNewList.AddTrack(myTrack) File
"C:Python24Libsite-packageswin32comclient__init__.py", line 454, in
__getattr__ raise AttributeError, "';%s' object has no
attribute '%s9;" % (repr(self), attr) AttributeError:
'<win32com.gen_py.iTunes 1.8 Type Library.IITPlaylist instance at
0x29470352>' object has no attribute 'AddTrack'
Does anyone know why one machine would work, while another
wouldn';t? Improper machine setup, maybe? I've followed every step
twice in setup.
Thanks,
Li --
_______________________________________________ Python-win32 mailing list python.org">Python-win32 python.org
http://mail.python.org/mailman/listinfo/python-win32
-- http://www.goldwatches.com
http://www.wazoozle.com
|
[1-2]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|