Проверьте, есть ли строка в входе
try:
val = int(userInput)
except ValueError:
print("That's not an int!")
Annoyed Ant
try:
val = int(userInput)
except ValueError:
print("That's not an int!")