Where is the error in my code?

Hi! Is there any error in my add-on?
https://ankiweb.net/shared/info/1337506368.
This is an add-on which diagnoses leeches (duh) to make them easier to edit.
Although, it seems like it isn’t working. Any help?