Printing out actual error message for ValueError
try:
...
except ValueError as e:
print(e)
Python 3 requires casting the exception to string before printing:
try:
...
except ValueError as error:
print(str(error))
try:
...
except ValueError as e:
print(e)
Python 3 requires casting the exception to string before printing:
try:
...
except ValueError as error:
print(str(error))