Ich versuche, eine Variable mit logging.debug
zu drucken und in unten Fehler zu laufen, wie es zu beheben?logging.debug Fehler während der Formatierung der Zeichenfolge
logging.debug('ATTEMPTS:{0}',attempts)
Fehler: -
Traceback (most recent call last):
File "C:\Python27\lib\logging\__init__.py", line 846, in emit
msg = self.format(record)
File "C:\Python27\lib\logging\__init__.py", line 723, in format
return fmt.format(record)
File "C:\Python27\lib\logging\__init__.py", line 464, in format
record.message = record.getMessage()
File "C:\Python27\lib\logging\__init__.py", line 328, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Mögliches Duplikat von [TypeError: nicht alle Argumente wurden während der Formatierung von Python konvertiert] (http://stackoverflow.com/questions/18053500/typeerror-not-all-arguments-converted-during-string-formatting-python) – antiguru