2016-04-06, 06:10
I cannot figure out for the life of me what is wrong with my code. I keep getting "not all arguments converted during string formatting." I am running XBMC Gotham 13.2 on Windows 7 btw.
Here are the contents of my xbmc.log file
Can somebody please help me??
Code:
#Rom Advanced Modification Menu
type_nc = type_nc + 1 #30323
if (type == type_nc ):
dialog = xbmcgui.Dialog()
type2 = dialog.select(__language__( 30323 ), [__language__( 30337 ) % self.launchers[launcher]["roms"][rom]["filename"], __language__( 30302 ) % self.launchers[launcher]["roms"][rom]["thumb"], __language__( 30350 ) % self.launchers[launcher]["roms"][rom]["screenshot"], __language__( 30303 ) % self.launchers[launcher]["roms"][rom]["fanart"], __language__( 30347 ) % self.launchers[launcher]["roms"][rom]["altapp"], __language__( 30348 ) % self.launchers[launcher]["roms"][rom]["altarg"], __language__( 30341 ) % self.launchers[launcher]["roms"][rom]["trailer"], __language__( 30331 ) % self.launchers[launcher]["roms"][rom]["custom"]])
type2_nc = 0
# Selection of the item file
if (type2_nc == 0 ):
item_file = xbmcgui.Dialog().browse(1,__language__( 30017 ),"files","."+self.launchers[launcher]["romext"].replace("|","|."), False, False, self.launchers[launcher]["roms"][rom]["filename"])
self.launchers[launcher]["roms"][rom]["filename"] = item_file
self._save_launchers()
# Rom thumbnails path menu option
type2_nc = type2_nc + 1
if (type2 == type2_nc ):
thumb_path = xbmcgui.Dialog().browse(0,__language__( 30059 ),"files","", False, False, self.launchers[launcher]["roms"][rom]["thumbpath"])
self.launchers[launcher]["roms"][rom]["thumbpath"] = thumb_path
self._save_launchers()
# Rom screenshot path menu option
type2_nc = type2_nc + 1
if (type2 == type2_nc ):
screenshot_path = xbmcgui.Dialog().browse(0,__language__( 30214 ),"files","", False, False, self.launchers[launcher]["roms"][rom]["screenshotpath"])
self.launchers[launcher]["roms"][rom]["screenshotpath"] = screenshot_path
self._save_launchers()
# Rom fanarts path menu option
type2_nc = type2_nc + 1
if (type2 == type2_nc ):
fanart_path = xbmcgui.Dialog().browse(0,__language__( 30060 ),"files","", False, False, self.launchers[launcher]["roms"][rom]["fanartpath"])
self.launchers[launcher]["roms"][rom]["fanartpath"] = fanart_path
self._save_launchers()
# Launcher application path menu option
type2_nc = type2_nc + 1
if (type2 == type2_nc ):
if (os.environ.get( "OS", "xbox" ) == "xbox"):
filter = ".xbe|.cut"
else:
if (sys.platform == "win32"):
filter = ".bat|.exe|.cmd|.lnk"
else:
filter = ""
app = xbmcgui.Dialog().browse(1,__language__( 30023 ),"files",filter, False, False, self.launchers[launcher]["roms"][rom]["altapp"])
self.launchers[launcher]["roms"][rom]["altapp"] = app
self._save_launchers()
# Edition of the launcher arguments
type2_nc = type2_nc + 1
if (type2 == type2_nc ):
keyboard = xbmc.Keyboard(self.launchers[launcher]["roms"][rom]["altarg"], __language__( 30052 ))
keyboard.doModal()
if (keyboard.isConfirmed()):
self.launchers[launcher]["roms"][rom]["altarg"] = keyboard.getText()
self._save_launchers()
# Selection of the rom trailer file
type2_nc = type2_nc + 1
if (type2 == type2_nc ):
trailer = xbmcgui.Dialog().browse(1,__language__( 30090 ),"files",".mp4|.mpg|.avi|.wmv|.mkv|.flv", False, False, self.launchers[launcher]["roms"][rom]["trailer"])
self.launchers[launcher]["roms"][rom]["trailer"] = trailer
self._save_launchers()
# Selection of the rom customs path
type2_nc = type2_nc + 1
if (type2 == type2_nc ):
custom = xbmcgui.Dialog().browse(0,__language__( 30057 ),"files","", False, False, self.launchers[launcher]["roms"][rom]["custom"])
self.launchers[launcher]["roms"][rom]["custom"] = custom
self._save_launchers()
#Delete Rom
type_nc = type_nc + 1
if (type == type_nc ): #30304
self._remove_rom(launcher,rom)
# Return to the launcher directory
xbmc.executebuiltin("Container.Refresh")
Here are the contents of my xbmc.log file
PHP Code:
20:46:52 T:15664 NOTICE: -->Python Interpreter Initialized<--
20:46:52 T:15664 NOTICE: AdvancedLauncher: Load launchers.xml file
20:46:52 T:15664 NOTICE: AdvancedLauncher: Initialization
20:46:53 T:15664 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.TypeError'>
Error Contents: not all arguments converted during string formatting
Traceback (most recent call last):
File "C:\Users\Tony\AppData\Roaming\XBMC\addons\plugin.program.advanced.launcher\addon.py", line 20, in <module>
plugin.Main()
File "C:\Users\Tony\AppData\Roaming\XBMC\addons\plugin.program.advanced.launcher\resources\lib\launcher_plugin.py", line 146, in __init__
self._edit_rom(launcher, rom)
File "C:\Users\Tony\AppData\Roaming\XBMC\addons\plugin.program.advanced.launcher\resources\lib\launcher_plugin.py", line 572, in _edit_rom
type2 = dialog.select(__language__( 30323 ), [__language__( 30337 ) % self.launchers[launcher]["roms"][rom]["filename"], __language__( 30302 ) % self.launchers[launcher]["roms"][rom]["thumb"], __language__( 30350 ) % self.launchers[launcher]["roms"][rom]["screenshot"], __language__( 30303 ) % self.launchers[launcher]["roms"][rom]["fanart"], __language__( 30347 ) % self.launchers[launcher]["roms"][rom]["altapp"], __language__( 30348 ) % self.launchers[launcher]["roms"][rom]["altarg"], __language__( 30341 ) % self.launchers[launcher]["roms"][rom]["trailer"], __language__( 30331 ) % self.launchers[launcher]["roms"][rom]["custom"]])
TypeError: not all arguments converted during string formatting
-->End of Python script error report<--