title: Python TypeError: non-empty format string passed to object.__format__
body: <p>I hit this TypeError exception recently, which I found very difficult to debug. I eventually reduced it to this small test case:</p>
  
  <pre><code>&gt;&gt;&gt; "{:20}".format(b"hi")
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  TypeError: non-empty format string passed to object.__format__
  </code></pre>
  
  <p>This is very non-obvious, to me anyway. The workaround for my code was to decode the byte string into unicode:</p>
  
  <pre><code> &gt;&gt;&gt; "{:20}".format(b"hi".decode("ascii"))
   'hi                  '
  </code></pre>
  
  <p>What is the meaning of this exception? Is there a way it can be made more clear?</p>