The error is "invalid literal for int() with base 10:". This means that the argument that you passed to int doesn't look like a number. In other words it's either empty, or has a char in it other than a digit.
This can be reproduced in a python shell.
ValueError: invalid literal for int() with base 10: 'x'