Verifique el tipo de excepción
try:
# the code for which you want to catch the exception
except Exception as err:
print(err)
ykk
try:
# the code for which you want to catch the exception
except Exception as err:
print(err)