Ce n' : TypeError: ne peut pas concaténer 'str' et 'liste' objets?

Que fait cette erreur signifie?

TypeError: ne peut pas concaténer 'str' et 'liste' des objets

Voici une partie du code:

for j in ('90.','52.62263.','26.5651.','10.8123.'):
    if j == '90.':
        z = ('0.')
    elif j == '52.62263.':
        z = ('0.', '72.', '144.', '216.', '288.')

    for k in z:
        exepath = os.path.join(exe file location here)
        exepath = '"' + os.path.normpath(exepath) + '"'
        cmd = [exepath + '-j' + str(j) + '-n' + str(z)]

        process=Popen('echo ' + cmd, shell=True, stderr=STDOUT )
        print process
  • Vous pouvez poster votre code?
  • eu - ma réponse qui fonctionne pour vous maintenant.
  • d'autre == '52.62263.': <-- est une erreur de syntaxe python
InformationsquelleAutor | 2009-06-18