ValueError: invalid literal for int() with base 10: 'jpg' code example

Example 1: Python ValueError: invalid literal for int() with base 10:

# try using int(float(x)) as per the example below... Worked for me :)
int(float('55063.000000'))
# expected output: 55063.0

Example 2: ValueError: invalid literal for int() with base 10: site:stackoverflow.com

# Just for the record:
int('55063.000000')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: '55063.000000'

# use this
int(float('55063.000000'))

Example 3: invalid literal for int() with base 10 python

#The Python ValueError: invalid literal for int() with base 10 error 
#  is raised when you try to convert a string value that is not formatted
#  as an integer. like a = "name" to int(a)