2015-11-06, 00:54
@zag. I tried to run the following code instead of default code helloword code and keep getting error:
and this error i get:
xbmc.log details:
could you help me fix this error ? Furthermore,I want to edit this hello word add on so it become a video add on . Currently it opens the app from program section with error . How to install the addon to video section instead?
Code:
import sys
import xbmcgui
import xbmcplugin
addon_handle = int(sys.argv[1])
xbmcplugin.setContent(addon_handle, 'movies')
url = 'http://someremotewebsite/some_video.mp4'
li = xbmcgui.ListItem('My First Video!', iconImage='DefaultVideo.png')
xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)
xbmcplugin.endOfDirectory(addon_handle)
and this error i get:
Code:
Error:Script failed!:Hello World
xbmc.log details:
Code:
ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.IndexError'>
Error Contents: list index out of range
Traceback (most recent call last):
File "C:\......\addons\script.hello.world-master\addon.py", line 5, in <module>
addon_handle = int(sys.argv[1])
IndexError: list index out of range
-->End of Python script error report<--
could you help me fix this error ? Furthermore,I want to edit this hello word add on so it become a video add on . Currently it opens the app from program section with error . How to install the addon to video section instead?