problematic usage of str.format()
if you do "...".format(x), it will run into trouble when x is unicode (not str) and does not encode using the ascii encoder.
if this can happen, then one MUST use u"...".format(x).
(you are not alone with this, we had / have(?) a lot of such trouble in main repo also.)