Catch RuntimeError when GS not installed
This commit is contained in:
parent
992040e812
commit
f43f9cda2f
@ -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...")
|
||||
|
Loading…
x
Reference in New Issue
Block a user