diff --git a/read_datasheet.py b/read_datasheet.py index a0dbc37..8080f76 100755 --- a/read_datasheet.py +++ b/read_datasheet.py @@ -60,7 +60,7 @@ def parse(filename, output_dir, partnum, dstype): tables = camelot.read_pdf(filename, pages="1-end", flavor='lattice', backend="ghostscript", split_text=False, line_scale=100, process_background=True, resolution=600, interations=1, layout_kwargs={'detect_vertical': False, 'char_margin': 0.5}, shift_text=['r', 't']) elif dstype == "Alphawire": tables = camelot.read_pdf(filename, pages="1-end", flavor='lattice', backend="ghostscript", split_text=False, line_scale=50, process_background=True, resolution=600, interations=1, layout_kwargs={'detect_vertical': True, 'char_margin': 0.5}, shift_text=['l', 't']) - except OSError as e: + except (OSError, RuntimeError) as e: print(e) if win32: print("Ghostscript is not installed! Launching installer...")