Use fixed-point floats in errors for compatibility

Hopefully something as specific as {0:f} will produce exactly the same
string in all versions of Python.