Update hocr2pdf.py

change exception type