This should be `{0!r}`.  Similar issue appears in a few places below.