Describe the bug
when trying to backup build it fails because some addons doesnt have proper xml deceleration
2021-06-11 19:36:14.108 T:15432 ERROR : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'xml.etree.ElementTree.ParseError'>
Error Contents: XML or text declaration not at start of entity: line 2, column 0
Traceback (most recent call last):
File "C:\Users\home\AppData\Roaming\Kodi\addons\plugin.program.openwizard\default.py", line 29, in
dispatcher.dispatch(_handle, _params)
File "C:\Users\home\AppData\Roaming\Kodi\addons\plugin.program.openwizard\resources\libs\common\router.py", line 289, in dispatch
backup.backup(action)
File "C:\Users\home\AppData\Roaming\Kodi\addons\plugin.program.openwizard\resources\libs\backup.py", line 838, in backup
cls.backup_build(name)
File "C:\Users\home\AppData\Roaming\Kodi\addons\plugin.program.openwizard\resources\libs\backup.py", line 274, in backup_build
binaryid, binaryname = db.find_binary_addons(addon=foldername)
File "C:\Users\home\AppData\Roaming\Kodi\addons\plugin.program.openwizard\resources\libs\db.py", line 517, in find_binary_addons
root = ElementTree.parse(xml).getroot()
File "C:\Program Files (x86)\Kodi\system\python\Lib\xml\etree\ElementTree.py", line 1202, in parse
tree.parse(source, parser)
File "C:\Program Files (x86)\Kodi\system\python\Lib\xml\etree\ElementTree.py", line 595, in parse
self._root = parser._parse_whole(source)
File "", line None
xml.etree.ElementTree.ParseError: XML or text declaration not at start of entity: line 2, column 0
-->End of Python script error report<--
example for addons: elementum repository, script.module.pytz, script.module.xbmcswift2
if this exeption cannot be handled it would be great to just skip the problematic addons and get a report afterwards
To Reproduce
Steps to reproduce the behavior:
- Go to maintenance
- Click on backup/restore
- Scroll down to backup build
- include addon data
- See error
Platform
Kodi 19.1 on windows 10