I am using a python program on a lot of different documents and for few of them I will get NoneType error. I just want to skip those files and continue for others, I do this without a problem for IndexError,TypeError,ValueError,NameError :<br>
<br>try:<br> ....<br>except (IndexError,TypeError,ValueError,NameError):<br> ....<br><br>but when I add NoneType it gives the following error:<br>except (NoneType,IndexError,TypeError,ValueError,NameError):<br>NameError: name 'NoneType' is not defined<br>
<br>and if I do not use the NoneType then it does not go through either and stops the program when I get to such a file. Is there another name that captures this error?<br><br>Thanks for your help,<br><br>Maryam<br>