Solved 'Attempt to use invalid handle -1' error - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: Solved 'Attempt to use invalid handle -1' error (/showthread.php?tid=328080) |
'Attempt to use invalid handle -1' error - Etchot - 2018-02-04 I am learning Python through the development of a Kodi add-on. I am trying to display an image using the xbmcplugin.setResolvedUrl() function but I get an error: Quote:'Attempt to use invalid handle -1' error.I am getting rid of the error when including li.setProperty("IsPlayable", "true") in my addFile function but then the image is not displayed. What am I doing wrong? Code: import sys RE: 'Attempt to use invalid handle -1' error - spiff - 2018-02-06 you have to include li.setProperty('IsPlayable','true') in addFile. if not you are not actually getting a resolveUrl playback. RE: 'Attempt to use invalid handle -1' error - Etchot - 2018-02-06 When I include li.setProperty("IsPlayable", "true") in my addFile function the error is not shown but then the image is not displayed. It looks like I am notgetting a resolveUrl playback. RE: 'Attempt to use invalid handle -1' error - spiff - 2018-02-06 did you mark the listitem as a file ? RE: 'Attempt to use invalid handle -1' error - Etchot - 2018-02-06 Sorry, what do you mean? RE: 'Attempt to use invalid handle -1' error - Roman_V_M - 2018-02-06 My quick experiments showed that setResolvedUrl plugin path does not work for photos, like it does for videos, unless I'm missing some non-obvious option. For photos only direct URLs are working. RE: 'Attempt to use invalid handle -1' error - Etchot - 2018-02-07 You are absolutely right! When I replace the url of the photo with a url of a video and I include li.setProperty("IsPlayable", "true") in my addFile function, the xbmcplugin.setResolvedUrl() function works fine. |