As Lattyware said, there is a difference between Python2 & Python3 that leads to this error:
With Python2, int(str(5/2))
gives you 2.
With Python3, the same gives you: ValueError: invalid literal for int() with base 10: '2.5'
If you need to convert some string that could contain float instead of int, you should always use the following ugly formula:
int(float(myStr))
As float('3.0')
and float('3')
give you 3.0, but int('3.0')
gives you the error.