This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients eric.smith, r.david.murray
Date 2014-02-05.23:23:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1391642595.93.0.722493013717.issue20524@psf.upfronthosting.co.za>
In-reply-to
Content
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()
History
Date User Action Args
2014-02-05 23:23:15r.david.murraysetrecipients: + r.david.murray, eric.smith
2014-02-05 23:23:15r.david.murraysetmessageid: <1391642595.93.0.722493013717.issue20524@psf.upfronthosting.co.za>
2014-02-05 23:23:15r.david.murraylinkissue20524 messages
2014-02-05 23:23:15r.david.murraycreate