ERROR: Failed to parse addon.xml
#1
This is my first try to build a Kodi addon. I'm using plugin.video.example codes, but I can't import a python module (requests) to this code. I tried adding the following line inside the <requires> section of addon.xml file:
Code:
<import addon="script.module.requests" version="2.4.3"/>
But this is the error I see in the log file when I try to install the zip file:
Code:
ERROR: Failed to parse 'zip://%2fhome%2fsaeed%2fl%2fplugin.video.example.zip/plugin.video.example/addon.xml'

I also couldn't find the requests module in the "manage dependencies" section of settings. What should I do to import this module to the code that is already working?
Reply
#2
It would be helpful to see the entire addon.xml.  The only thing I see offhand that *might* be a problem is I think you might need a space between the last close quote and the slash.  But honestly I don't think that's it.
Reply
#3
(2020-01-20, 22:58)pkscout Wrote: It would be helpful to see the entire addon.xml.  The only thing I see offhand that *might* be a problem is I think you might need a space between the last close quote and the slash.  But honestly I don't think that's it.

Here is my addon.xml file:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<addon id="plugin.video.example"
version="2.3.1"
name="Example Kodi Video Plugin"
provider-name="Roman_V_M">
<requires>
<import addon="xbmc.python" version="2.25.0"/>
<import addon="script.module.requests" version="2.4.3"/>
</requires>
<extension point="xbmc.python.pluginsource" library="main.py">
<provides>video</provides>
</extension>
<extension point="xbmc.addon.metadata">
<summary lang="en">Get Movie Download Links from DayMovie Website</summary>
<description lang="en_GB">An example video plugin for Kodi mediacenter.</description>
<disclaimer lang="en_GB">Free sample videos are provided by www.vidsplay.com.</disclaimer>
<assets>
<icon>icon.png</icon>
<fanart>fanart.jpg</fanart>
<screenshot>resources\screenshot-01.jpg</screenshot>
<screenshot>resources\screenshot-02.jpg</screenshot>
<screenshot>resources\screenshot-03.jpg</screenshot>
</assets>
<news>Updated with latest artwork metadata</news>
</extension>
</addon>

Reply
#4
Hmmm.  When checked with an XML parser, the addon.xml is fine.  So I don't think that's actually the problem.  It could mean the zip file itself doesn't have the right structure.  One thing.  If you're on a Mac you can't use the GUI right click to zip the folder with the addon (at least you couldn't in the past).  You have to use the command line or the zip file doesn't work with Kodi.  Next helpful step would be for you to post a link to a full debug log of you trying to install the addon.  There's a link in my sig on how to enable and post a link to a debug log.
Reply
#5
Same here. There are no more relevant logs apart from the line the complains the xml file cannot be opened. I suspected it's a file permission issue. But changing the permissions didn't help. I managed to install the addon by manually copying texts into another addon that can be installed. I've also compared their directory structures. Everything is identical apart from dates of creation and a com.apple.quarantine attribute. However, one of them installs, the other doesn't.
Reply

Logout Mark Read Team Forum Stats Members Help
ERROR: Failed to parse addon.xml0