[pywin32-bugs] [ pywin32-Bugs-3293883 ] InvokeType with python32
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2011-04-27 17:06:58
|
Bugs item #3293883, was opened at 2011-04-27 19:06 Message generated for change (Tracker Item Submitted) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3293883&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: com Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: https://www.google.com/accounts () Assigned to: Nobody/Anonymous (nobody) Summary: InvokeType with python32 Initial Comment: I want to control iTunes from python using pywin32 and just want ro add a track to a playlist it = win32com.client.Dispatch("iTunes.Application") pl = it.LibrarySource.Playlists.ItemByName("NewPL") if pl == None: pl = it.CreatePlaylist("NewPL"); track = it.LibraryPlaylist.Tracks[1] upl = win32com.client.CastTo(pl, "IITUserPlaylist") upl.AddTrack(track) This code works perfectly with python27 and pywin32-216.win32-py2.7.exe. But with python 3.2 and pywin32-216.1.win32-py3.2.exe i got the following error Traceback (most recent call last): File "D:\Users\fillg1\workspace\pyTest\src\event.py", line 34, in <module> upl.AddTrack(track) File "D:\Tools\Python32\lib\site-packages\win32com\gen_py\9E93C96F-CF0D-43F6-8BA8-B807A3370712x0x1x13\IITUserPlaylist.py", line 54, in AddTrack ret = self._oleobj_.InvokeTypes(1610874883, LCID, 1, (9, 0), ((16396, 1),),iTrackToAdd File "D:\Tools\Python32\lib\site-packages\win32com\client\__init__.py", line 462, in __getattr__ raise AttributeError("'%s' object has no attribute '%s'" % (repr(self), attr)) AttributeError: '<win32com.gen_py.iTunes 1.13 Type Library.IITPlaylist instance at 0x44495728>' object has no attribute 'InvokeTypes' Any idea ? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3293883&group_id=78018 |