It's not
it's:
case sensitive
To catch all exceptions, write it like (untested):
except Keyerror:
it's:
except KeyError:
case sensitive
To catch all exceptions, write it like (untested):
import sys try: PdfTitle = pdftitle.run(FilePath) except: print(f"Unexpected exception: {sys.exc_info()[0]}")