title: Invalid literal for int() Python
body: <p>I got invalid literal for int() in Python but it is really weird because the literal is "1". Of course if I try in IPython int("1") or int(u"1") I have no errors but in my own code the same instruction gives an error.</p>
  
  <pre><code>        try:
              VimsLog().debug("val = %s" % val)
              int(val)
          except Exception, e:
              VimsLog().debug(e)
              VimsLog().debug("I am died")
              return val
  </code></pre>
  
  <p>Where</p>
  
  <pre><code>e=invalid literal for int(): "1"
  </code></pre>
  
  <p>For reason of compatibility I'm using Python 2.4</p>