v13 not all arguments converted during string formatting
#1
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.
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  NOTICEAdvancedLauncherLoad launchers.xml file
20
:46:52 T:15664  NOTICEAdvancedLauncherInitialization
20
:46:53 T:15664   ERROREXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - 
NOTEIGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            
Error Type: <type 'exceptions.TypeError'>
                                            
Error Contentsnot 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 20in <module>
                                                
plugin.Main()
                                              
File "C:\Users\Tony\AppData\Roaming\XBMC\addons\plugin.program.advanced.launcher\resources\lib\launcher_plugin.py"line 146in __init__
                                                self
._edit_rom(launcherrom)
                                              
File "C:\Users\Tony\AppData\Roaming\XBMC\addons\plugin.program.advanced.launcher\resources\lib\launcher_plugin.py"line 572in _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"]])
                                            
TypeErrornot all arguments converted during string formatting
                                            
-->End of Python script error report<-- 
Can somebody please help me??
Reply
#2
I think that means that at least one of your language strings doesn't have a string formatter (e.g. "%s") in it.

see this example:
Code:
In [1]: ["%s" % "a", "%s" % "b", "1" % "c"]
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-1-ca4e0c73c3f1> in <module>()
----> 1 ["%s" % "a", "%s" % "b", "1" % "c"]
TypeError: not all arguments converted during string formatting

You should check the strings you're trying to include in the list.
BBC Live Football Scores: Football scores notifications service.
script.squeezeinfo: shows what's playing on your Logitech Media Server
Reply

Logout Mark Read Team Forum Stats Members Help
not all arguments converted during string formatting0