updated attachcheck to work with python 3.11

Benjamin Mako Hill || Want to submit a patch?