2022-05-18, 01:20
Hello again, Kodi community. I've been continuing to develop an add-on and I ran into an index error (list index out of range) while trying to get a setting from settings.xml. To get to the bottom of the problem, I stripped down the add-on to just the bare minimum functionality while still getting the same error.
addon.py:
settings.xml (inside the resources folder, with labels defined in strings.po inside language/resource.language.en_gb):
Here's the pastebin: https://paste.kodi.tv/ahuguloqim.kodi
Any help with troubleshooting this would be greatly appreciated. Thanks so much!
addon.py:
addon.xml:python:import xbmc, xbmcplugin, sys
if (__name__ == '__main__'):
monitor = xbmc.Monitor()
while not monitor.abortRequested():
if monitor.waitForAbort(1):
break
testSetting = xbmcplugin.getSetting(int(sys.argv[1]), "testSetting")
print(str(testSetting))
xml:<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.testing" name="Testing" version="0.0.2">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
</requires>
<extension point="xbmc.python.script" library="addon.py">
<provides>executable</provides>
</extension>
<extension point="xbmc.addon.metadata">
<platform>all</platform>
<license>GNU General Public License, v2</license>
</extension>
</addon>
settings.xml (inside the resources folder, with labels defined in strings.po inside language/resource.language.en_gb):
xml:<?xml version="1.0" ?>
<settings version="1">
<section id="script.testing">
<category id="allSettings" label="30001" help="">
<group id="1">
<setting id="testSetting" type="integer" label="30002" help="">
<level>0</level>
<default>3</default>
<constraints>
<minimum>0</minimum>
<step>1</step>
<maximum>3</maximum>
</constraints>
<control type="slider" format="integer">
<popup>false</popup>
</control>
</setting>
</group>
</category>
</section>
</settings>
Here's the pastebin: https://paste.kodi.tv/ahuguloqim.kodi
Any help with troubleshooting this would be greatly appreciated. Thanks so much!