Python TypeError: not enough arguments for format string
问题 Here's the output. These are utf-8 strings I believe... some of these can be NoneType but it fails immediately, before ones like that... instr = "'%s', '%s', '%d', '%s', '%s', '%s', '%s'" % softname, procversion, int(percent), exe, description, company, procurl TypeError: not enough arguments for format string Its 7 for 7 though? 回答1: Note that the % syntax for formatting strings is becoming outdated. If your version of Python supports it, you should write: instr = "'{0}', '{1}', '{2}', '{3}'