The methods in views.py do not account for cases where RDKit raises an error rather than returns no mol object. Note, these are difficult to handle cases because the RDKit python bindings don't have the C++ errors that occur. In my experience, it necessary to handle these by catching TypeError exceptions.
I suggest either refactoring to call methods which have do exception handling, or to write a decorator which does this. I can do either of these if anyone has a preference.
The methods in
views.py
do not account for cases where RDKit raises an error rather than returns nomol
object. Note, these are difficult to handle cases because the RDKit python bindings don't have the C++ errors that occur. In my experience, it necessary to handle these by catchingTypeError
exceptions.I suggest either refactoring to call methods which have do exception handling, or to write a decorator which does this. I can do either of these if anyone has a preference.