title: Python : Typeerror : Non-empty format string passed to object.__format__
body: <p>I know this question has been asked <a href="https://stackoverflow.com/questions/24170519/python-typeerror-non-empty-format-string-passed-to-object-format">here</a> but the solution does not work for me. I am using <code>python 3.4</code>.</p>
  <p>I have the following formatting in my script :</p>
  <pre><code>print ( &quot;\t {0:20} {1:&lt;11} {2:&lt;25} {3:11} {4:11} {5:&gt;32}&quot;.format( files.name.split('/')[-1], sizeof_fmt(files.size),
                                                                            str( formatted_timestamp ), files.owner,
                                                                            files.version_id, files.etag ))
  </code></pre>
  <p>This works in python <code>2.7.x</code>. But in <code>3.4</code> I get the error:</p>
  <pre><code>File &quot;test.py&quot;, line 3, in file_print
        versionid, etag ))
  TypeError: non-empty format string passed to object.__format__
  </code></pre>
  <p>I tried this:</p>
  <pre><code>print ( &quot;\t {0:20} {1:&lt;11} {2:&lt;25} {3:11} {!s4:11s} {!s5:&gt;32s}&quot;.format( files.name.split('/')[-1], sizeof_fmt(files.size),
                                                                            str( formatted_timestamp ), files.owner,
                                                                            files.version_id, files.etag ))
  </code></pre>
  <p>But I still get the same error. I even converted the <code>versionid</code> and <code>etag</code> to strings and end up getting the same error. Can someone explain this to me?</p>
  <p>Etag look like this <code>9893532233caff98cd083a116b013c0b</code>, versionid is <code>None</code></p>