[RELEASE] iTunes Playlist Importer Addon - Convert all iTunes Playlists to XBMC's M3U
#16
(2011-08-26, 10:47)reddwarf355 Wrote: Getting the following errors:


10:27:54 T:2958184448 DEBUG: WaitOnScriptResult - waiting on the iTunes Playlist Importer plugin...
10:27:54 T:2955980800 NOTICE: -->Python Interpreter Initialized<--
10:27:54 T:2955980800 DEBUG: Process - The source file to load is /Users/maurice/Library/Application Support/XBMC/addons/script.itunestom3u/addon.py
10:27:54 T:2955980800 DEBUG: Process - Setting the Python path to /Users/maurice/Library/Application Support/XBMC/addons/script.itunestom3u:/Users/maurice/Library/Application Support/XBMC/addons/script.module.simplejson/lib:/Users/maurice/Library/Application Support/XBMC/addons/script.module.beautifulsoup/lib:/Applications/XBMC.app/Contents/Resources/XBMC/addons/script.module.pil/lib:/Applications/XBMC.app/Contents/Resources/XBMC/addons/script.module.pysqlite/lib:/Applications/XBMC.app/Contents/Frameworks:/Applications/XBMC.app/Contents/Frameworks/lib/python26.zip:/Applications/XBMC.app/Contents/Frameworks/lib/python2.6:/Applications/XBMC.app/Contents/Frameworks/lib/python2.6/plat-darwin:/Applications/XBMC.app/Contents/Frameworks/lib/python2.6/plat-mac:/Applications/XBMC.app/Contents/Frameworks/lib/python2.6/plat-mac/lib-scriptpackages:/Applications/XBMC.app/Contents/Frameworks/lib/python2.6/lib-tk:/Applications/XBMC.app/Contents/Frameworks/lib/python2.6/lib-old:/Applications/XBMC.app/Contents/Frameworks/lib/python2.6/lib-dynload:/Applications/XBMC.app/Contents/Frameworks/lib/python2.6/site-packages:
10:27:54 T:2955980800 DEBUG: Process - Entering source directory /Users/maurice/Library/Application Support/XBMC/addons/script.itunestom3u
10:27:54 T:2955980800 DEBUG: Instantiating addon using automatically obtained id of "script.itunestom3u" dependent on version 1.0 of the xbmc.python api
10:27:54 T:2955980800 ERROR: /Users/maurice/Library/Application Support/XBMC/addons/script.itunestom3u/addon.py:36: SyntaxWarning: import * only allowed at module level
def __init__(self):
10:27:54 T:2955980800 ERROR: /Users/maurice/Library/Application Support/XBMC/addons/script.itunestom3u/addon.py:20: DeprecationWarning: os.getcwd() currently lies to you so please use addon.getAddonInfo('path') to find the script's root directory and DO NOT make relative path accesses based on the results of 'os.getcwd.'
PLUGIN_PATH = xbmc.translatePath(os.getcwd())
10:27:54 T:2955980800 ERROR: /Users/maurice/Library/Application Support/XBMC/addons/script.itunestom3u/addon.py:30: DeprecationWarning: os.getcwd() currently lies to you so please use addon.getAddonInfo('path') to find the script's root directory and DO NOT make relative path accesses based on the results of 'os.getcwd.'
addon = xbmcaddon.Addon(id=os.path.basename(os.getcwd()))
10:27:55 T:2894398144 DEBUG: ------ Window Init (DialogBusy.xml) ------
10:27:55 T:2894398144 DEBUG: Alloc resources: 0.01ms (0.00 ms skin load)
10:27:56 T:2958184448 INFO: Loading skin file: DialogProgress.xml
10:27:56 T:2958184448 DEBUG: Load DialogProgress.xml: 4.86ms
10:27:56 T:2958184448 DEBUG: DialogProgress::StartModal called
10:27:56 T:2958184448 DEBUG: ------ Window Init (DialogProgress.xml) ------
10:27:56 T:2958184448 DEBUG: Alloc resources: 0.29ms (0.00 ms skin load)
10:27:59 T:2894398144 DEBUG: ------ Window Deinit (Pointer.xml) ------
10:28:14 T:2955980800 INFO: -->Python script returned the following error<--
10:28:14 T:2955980800 ERROR: Error Type: <type 'exceptions.KeyError'>
10:28:14 T:2955980800 ERROR: Error Contents: ('Location',)
10:28:14 T:2955980800 ERROR: Traceback (most recent call last):
File "/Users/maurice/Library/Application Support/XBMC/addons/script.itunestom3u/addon.py", line 81, in <module>
run_program = Main()
File "/Users/maurice/Library/Application Support/XBMC/addons/script.itunestom3u/addon.py", line 70, in __init__
number_playlist= itunesconvert(libraryfile,oldmusicpath,musicpath,m3u_path)
File "/Users/maurice/Library/Application Support/XBMC/addons/script.itunestom3u/resources/lib/xmltom3u.py", line 37, in itunesconvert
fileloc_quote = playlist['Tracks'][str(track_id)]['Location']
KeyError: ('Location',)
10:28:14 T:2955980800 INFO: -->End of Python script error report<--
10:28:14 T:2894398144 DEBUG: ------ Window Init (DialogKaiToast.xml) ------

I get the same error... Sad
Reply
#17
Similar error here running Frodo with iTunes 11. Anyone having any better luck?

Code:
21:03:06 T:4536  NOTICE: -->Python Interpreter Initialized<--
21:03:06 T:4536   DEBUG: XBPyThread::Process - The source file to load is C:\Users\samuel\AppData\Roaming\XBMC\addons\script.itunestom3u\addon.py
21:03:06 T:4536   DEBUG: XBPyThread::Process - Setting the Python path to C:\Users\samuel\AppData\Roaming\XBMC\addons\script.itunestom3u;C:\Users\samuel\AppData\Roaming\XBMC\addons\script.module.myconnpy\lib;C:\Users\samuel\AppData\Roaming\XBMC\addons\script.module.beautifulsoup\lib;C:\Users\samuel\AppData\Roaming\XBMC\addons\script.common.plugin.cache\lib;C:\Users\samuel\AppData\Roaming\XBMC\addons\script.module.buggalo\lib;C:\Users\samuel\AppData\Roaming\XBMC\addons\script.module.xbmcswift2\lib;C:\Users\samuel\AppData\Roaming\XBMC\addons\script.module.xbmcswift\lib;C:\Users\samuel\AppData\Roaming\XBMC\addons\script.module.t0mm0.common\lib;C:\Users\samuel\AppData\Roaming\XBMC\addons\script.module.chardet\lib;C:\Program Files\XBMC\addons\script.module.simplejson\lib;C:\Program Files\XBMC\addons\script.module.pil\lib;C:\Users\samuel\AppData\Roaming\XBMC\addons\script.module.simple.downloader\lib;C:\Users\samuel\AppData\Roaming\XBMC\addons\script.module.urlresolver\lib;C:\Users\samuel\AppData\Roaming\XBMC\addons\script.module.rssengine\lib;C:\Users\samuel\AppData\Roaming\XBMC\addons\script.module.parsedom\lib;C:\Users\samuel\AppData\Roaming\XBMC\addons\script.module.elementtree\lib;C:\Program Files\XBMC\addons\script.module.pysqlite\lib;C:\Users\samuel\AppData\Roaming\XBMC\addons\script.module.metahandler\lib;C:\Program Files\XBMC\system\python\DLLs;C:\Program Files\XBMC\system\python\Lib;C:\Program Files\XBMC\python26.zip;C:\Program Files\XBMC\system\python\lib\plat-win;C:\Program Files\XBMC\system\python\lib\lib-tk;C:\Program Files\XBMC;C:\Program Files\XBMC\system\python;C:\Program Files\XBMC\system\python\lib\site-packages;
21:03:06 T:4536   DEBUG: XBPyThread::Process - Entering source directory C:\Users\samuel\AppData\Roaming\XBMC\addons\script.itunestom3u
21:03:06 T:4536   DEBUG: Instantiating addon using automatically obtained id of "script.itunestom3u" dependent on version 1.3 of the xbmc.python api
21:03:06 T:4536   ERROR: C:\Users\samuel\AppData\Roaming\XBMC\addons\script.itunestom3u\addon.py:37: SyntaxWarning: import * only allowed at module level
                                              def __init__(self):
21:03:06 T:4536   ERROR: EXCEPTION: Could not get AddonPtr given a script id of XBMC.If you are trying to use 'os.getcwd' to set the path, you cannot do that in a Version: 1.3 plugin.
21:03:06 T:4536   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.RuntimeError'>
                                            Error Contents: Could not get AddonPtr given a script id of XBMC.If you are trying to use 'os.getcwd' to set the path, you cannot do that in a Version: 1.3 plugin.
                                            Traceback (most recent call last):
                                              File "C:\Users\samuel\AppData\Roaming\XBMC\addons\script.itunestom3u\addon.py", line 30, in <module>
                                                addon = xbmcaddon.Addon(id=os.path.basename(os.getcwd()))
                                            RuntimeError: Could not get AddonPtr given a script id of XBMC.If you are trying to use 'os.getcwd' to set the path, you cannot do that in a Version: 1.3 plugin.
                                            -->End of Python script error report<--
Reply
#18
In case someone is interested in a temporary fix I ended up replacing all instances of os.getcwd() in addons.py with the actual working directory for the plugin.

Maybe someone could suggest an alternate function to os.getcwd() to return the current working directory rather than hardwiring the path in as I have done.

EDIT
The above method only works on OSX. Trying in Windows results in XBMC crashing.
Reply
#19
Hi Dave,

whenever I launch the addon I get ERROR script failed addon.py - I am running xbmc 12.2 on mac osx 10.8.

would be nice to have this working.

cheers
aussie
Reply
#20
Bringing up again a very old thread. Is still working or is there any new addon around that allows for easy import of itunes playlists?
Server: Asus Sabertooth Z77 | Intel Core i5 3.4 GHz | 16 GB DDR3 | 128 GB SSD, 82 TB (9 x 6 TB, 7 x 4 TB)
HTPC 1: Raspberry Pi 2 | HTPC 2: Raspberry Pi 2 | HTPC 3: Raspberry Pi
Reply

Logout Mark Read Team Forum Stats Members Help
[RELEASE] iTunes Playlist Importer Addon - Convert all iTunes Playlists to XBMC's M3U0