I'm practicing the exceptions in python and I have a problem, the exceptions are captured well but then the program does not work correctly.
#Utilizamos este metedo para importar las funciones del archivo
from Funciones import llegadaCamion,nuevoCamion,procesarEnvios,menu,visualizarCamiones,visualizarEnvios,visualizarCiudades
while True:
# Mostramos el menu
menu()
# solicituamos una opción al usuario
while True:
try:
opcionMenu = (int(input("inserta un numero valor >> ")))
break
except ValueError:
print("El valor introducido no es correcto vuelve a intentarlo")
if opcionMenu=="1":
print ("")
nuevoCamion()
elif opcionMenu=="2":
print ("")
llegadaCamion()
elif opcionMenu=="3":
print ("")
procesarEnvios()
elif opcionMenu=="4":
print("")
visualizarEnvios()
elif opcionMenu=="5":
print("")
visualizarCamiones()
elif opcionMenu=="6":
print("")
visualizarCiudades()
elif opcionMenu=="7":
print ("")
break
else:
input("No has pulsado ninguna opción correcta...\npulsa una tecla para continuar")
The fact is that when entering the data well, for example, the 1 does not enter the if it goes directly to the else, that happens in all the options, I do not understand why it does not enter the if.