You probably mean ValueError instead of "piwintypes" error. The ValueError occurs when a function receives an argument of the correct type, but with an inappropriate value. To handle this error in Python, you can use a try-except block like this:
main.py108 chars5 lines
Make sure to replace the comment with the code that could potentially raise a ValueError.
gistlibby LogSnag