Open rpdelaney opened 6 years ago
1f6b3b4 introduced a logger warning and so I reverted it in 6a6ae60.
Traceback (most recent call last):
File "/usr/lib/python3.6/logging/__init__.py", line 992, in emit
msg = self.format(record)
File "/usr/lib/python3.6/logging/__init__.py", line 838, in format
return fmt.format(record)
File "/usr/lib/python3.6/logging/__init__.py", line 575, in format
record.message = record.getMessage()
File "/usr/lib/python3.6/logging/__init__.py", line 338, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "annotator/__main__.py", line 759, in <module>
main()
File "annotator/__main__.py", line 743, in main
analyzed_game = analyze_game(game, args.gametime, args.engine, args.threads)
File "annotator/__main__.py", line 590, in analyze_game
game, root_node, ply_count = classify_opening(game)
File "annotator/__main__.py", line 443, in classify_opening
logger.info("Classifying the opening for non-variant ", variant, "game ...")
Message: 'Classifying the opening for non-variant '
Arguments: ('chess', 'game ...')
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib/python3.6/logging/__init__.py", line 992, in emit
msg = self.format(record)
File "/usr/lib/python3.6/logging/__init__.py", line 838, in format
return fmt.format(record)
File "/usr/lib/python3.6/logging/__init__.py", line 575, in format
record.message = record.getMessage()
File "/usr/lib/python3.6/logging/__init__.py", line 338, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "annotator/__main__.py", line 759, in <module>
main()
File "annotator/__main__.py", line 743, in main
analyzed_game = analyze_game(game, args.gametime, args.engine, args.threads)
File "annotator/__main__.py", line 599, in analyze_game
logger.debug("Total budget is {} seconds", budget)
Message: 'Total budget is {} seconds'
Arguments: (60.0,)```
Very minor issue but I need to note this down so I don't forget to correct it later. I've just learned that while string formatting is recommended in many (most?) contexts, it is not a good idea in logging messages. Some explanation is here. The relevant pylint messages are: