TypeError: not enough arguments for format string
Categories
(Testing :: mozregression, defect)
Tracking
(Not tracked)
People
(Reporter: tnikkel, Assigned: wlach)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Reporter | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
The line causing the problem seems to be this one:
logger.debug("{}: {}".format(record.name, str(record.msg) % record.args))
My guess is that it's this part causing the problem: str(record.msg) % record.args
. No idea why offhand though.
Reporter | ||
Comment 2•3 years ago
|
||
record.name requests.packages.urllib3.connectionpool
record.msg "GET /api/queue/v1/task/c2qkpZJoQKmyZdgfS0HOUA/runs/0/artifacts/public%2Fbuild%2Ftarget.dmg HTTP/1.1" 303 118
record.args ()
So the msg string has a url that has %'s in it that python thinks are format place holders.
Comment 3•3 years ago
|
||
Assignee | ||
Comment 4•3 years ago
|
||
(In reply to Timothy Nikkel (:tnikkel) from comment #2)
record.name requests.packages.urllib3.connectionpool
record.msg "GET /api/queue/v1/task/c2qkpZJoQKmyZdgfS0HOUA/runs/0/artifacts/public%2Fbuild%2Ftarget.dmg HTTP/1.1" 303 118
record.args ()So the msg string has a url that has %'s in it that python thinks are format place holders.
Ah got it. Checking the documentation again, it looks like best practice is to use a built in .format
method in these cases. Filed a PR, thanks for the report.
Assignee | ||
Updated•3 years ago
|
Description
•