Message210351
Consider the following:
'{run_time:%H:%M:%S}, ,COM,DA{id},"{title:.43}",{id},{length:%M:%S}'.format(**mydict)
The error message I got was:
Invalid format specifier
The problem turned out to be that the value of the 'length' key was an integer instead of a datetime.time(), but it sure wasn't easy to figure out which bit of the format string or which variable was the problem.
It would be nice for the format error message to include the pattern that it is parsing when it hits the error. The type of the value being substituted would also be nice. Perhaps something like:
The format specifier in {length:%HH:%MM} is not valid for type int() |
|
Date |
User |
Action |
Args |
2014-02-05 23:23:15 | r.david.murray | set | recipients:
+ r.david.murray, eric.smith |
2014-02-05 23:23:15 | r.david.murray | set | messageid: <1391642595.93.0.722493013717.issue20524@psf.upfronthosting.co.za> |
2014-02-05 23:23:15 | r.david.murray | link | issue20524 messages |
2014-02-05 23:23:15 | r.david.murray | create | |
|