title: How to Fix "invalid literal for int<> with base 10" error in python script
body: <p>I'm running a script to convert some media files and when i do the script is returning the error <code>invalid literal for int&lt;&gt; with base 10: line 132</code>. This is not my script nor is it supported by the author which is why i'm here looking for assistance. </p>
  
  <pre><code># Make time human-readable
  def humanize_time(secs): ## Line:132
      if secs != "N/A":
          mins, secs = divmod(int(secs), 60)
          hours, mins = divmod(mins, 60)
          return '%02d:%02d:%02d' % (hours, mins, secs)
      else:
          mins, secs = divmod(30, 60)
          hours, mins = divmod(mins, 60)
          return '%02d:%02d:%02d' % (hours, mins, secs)
  
  
  Traceback (most recent call last):
  File "C:\conv2mp4-py.py", line 415, in &lt;module&gt;
  codec_discovery()
  File "C:\conv2mp4-py.py", line 165, in codec_discover
  get_duration_temp = humanize_time(head)
  File "C:\conv2mp4-py.py", line 132, in humanize_time
  mins, secs = divmod(int(secs), 60)
  ValueError: invalid literal for int() with base 10: ''
  </code></pre>
  
  <p>The Script: <a href="https://github.com/BrianDMG/conv2mp4-py/blob/master/conv2mp4-py.py" rel="nofollow noreferrer">https://github.com/BrianDMG/conv2mp4-py/blob/master/conv2mp4-py.py</a></p>