error: script.favourites

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
StefanK Offline
Donor
Posts: 167
Joined: Mar 2012
Reputation: 1
Post: #1
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<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
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>
Main()
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...
find quote
ronie Offline
Team-Kodi Member
Posts: 13,165
Joined: Jan 2009
Reputation: 391
Post: #2
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..

Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ and Search the forum before posting.
For troubleshooting and bug reporting please make sure you read this first.
find quote
StefanK Offline
Donor
Posts: 167
Joined: Mar 2012
Reputation: 1
Post: #3
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>
find quote
ronie Offline
Team-Kodi Member
Posts: 13,165
Joined: Jan 2009
Reputation: 391
Post: #4
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>

Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ and Search the forum before posting.
For troubleshooting and bug reporting please make sure you read this first.
find quote
StefanK Offline
Donor
Posts: 167
Joined: Mar 2012
Reputation: 1
Post: #5
You're a genius - or at least very much more xml-savvy than I :-)
Thanks again
find quote
ctawn Offline
Fan
Posts: 311
Joined: May 2009
Reputation: 5
Post: #6
using the ampersand escapes saved my butt on this, too, just now.
find quote
Atone69 Offline
Junior Member
Posts: 2
Joined: Nov 2016
Reputation: 0
Post: #7
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
(This post was last modified: 2016-11-01 22:33 by Atone69.)
find quote