Kodi Community Forum

Full Version: error: script.favourites
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am unable to change the favourites in my submenus.
When I try I get the message error / script error / favourites script

The log file shows:
ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
Error Type: <class 'xml.parsers.expat.ExpatError'>
Error Contents: not well-formed (invalid token): line 60, column 201
Traceback (most recent call last):
File "C:\Users\XBMC\AppData\Roaming\XBMC\addons\script.favourites\default.py", line 169, in <module>
File "C:\Users\XBMC\AppData\Roaming\XBMC\addons\script.favourites\default.py", line 22, in __init__
found, favourites = self._read_file()
File "C:\Users\XBMC\AppData\Roaming\XBMC\addons\script.favourites\default.py", line 46, in _read_file
self.doc = parse( self.fav_file )
File "C:\Program Files (x86)\XBMC\system\python\Lib\xml\dom\minidom.py", line 1921, in parse
return expatbuilder.parse(file)
File "C:\Program Files (x86)\XBMC\system\python\Lib\xml\dom\expatbuilder.py", line 924, in parse
result = builder.parseFile(fp)
File "C:\Program Files (x86)\XBMC\system\python\Lib\xml\dom\expatbuilder.py", line 207, in parseFile
parser.Parse(buffer, 0)
ExpatError: not well-formed (invalid token): line 60, column 201
-->End of Python script error report<--

I did at one point delete the file favourites.xml, but I don't know if that has something to do with it...
well, looks like the file is corrupt now.
you could try opening it with a text editor to check whats wrong.
'line 60, column 201' is where the error is, probably some odd character..
Thanks Ronie!
I deleted the line, which made the process work again.
Adding the favorite again though, only brings back the problem. Can you see what is wrong?
<favourite name="Artists" thumb="C:\Users\XBMC\AppData\Roaming\XBMC\addons\plugin.audio.googlemusic.exp\icon.png">ActivateWindow(10501,&quot;plugin://plugin.audio.googlemusic.exp/?path=filter&criteria=artist&quot;,return)</favourite>
yeah, that line is indeed not valid xml.
it's probably a bug in xbmc i guess.

to work around it, manually edit that file and change the line to:
<favourite name="Artists" thumb="C:\Users\XBMC\AppData\Roaming\XBMC\addons\plugin.audio.googlemusic.exp\icon.png">ActivateWindow(10501,&quot;plugin://plugin.audio.googlemusic.exp/?path=filter&amp;criteria=artist&quot;,return)</favourite>
You're a genius - or at least very much more xml-savvy than I :-)
Thanks again
using the ampersand escapes saved my butt on this, too, just now.
When i change to xonflunce I get the message error / script error / favourites script how can i fix an how to i post picture of error on fourms.. Im running kodi krypton beta on a Apple tv4 the error pervents me from adding a sub menu on home page

Favorites error