Kodi Community Forum
listfolder errors in new beta1 - 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: listfolder errors in new beta1 (/showthread.php?tid=145457)



listfolder errors in new beta1 - xayide - 2012-11-17

I get the below error in the Beta. My script works in a month or two old nightly build of frodo. What has changed in the API that could generate this error in my script? The path that it errors out on is 'C:/*.*' but in the log it shows up as 'c%3a%2f%2f/*.*'

Seems to be some character coding error? Code is here: http://pastebin.com/0S2X9RdV



12:16:23 T:2012 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.WindowsError'>
Error Contents: (3, 'The system cannot find the path specified', 'c%3a%2f%2f/*.*')
Traceback (most recent call last):
File "C:\XBMC\addons\MarkFolder.xayide.com\default.py", line 93, in <module>
listFolderContent(sys.argv[2][6:])
File "C:\XBMC\addons\MarkFolder.xayide.com\default.py", line 9, in listFolderContent
folderContents = os.listdir(rootFolder)
WindowsError: (3, 'The system cannot find the path specified', 'c%3a%2f%2f/*.*')
-->End of Python script error report<--
12:16:23 T:2012 INFO: Python script stopped


RE: listfolder errors in new beta1 - jmarshall - 2012-11-18

Your URL options must be URL encoded is your problem. XBMC decodes then encodes as it's parsing, thus if you don't have them setup encoded to begin with, things will break.


RE: listfolder errors in new beta1 - xayide - 2012-11-18

Thanks, its working now. I had to use unquote and quote_plus