From 215e5ea2a50e0ff07ec6d1229a506534d22a5d6a Mon Sep 17 00:00:00 2001 From: Vinayak Mehta Date: Sun, 6 Jan 2019 01:50:50 +0530 Subject: [PATCH] Move ghostscript import --- camelot/parsers/lattice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/camelot/parsers/lattice.py b/camelot/parsers/lattice.py index c01727c..6d7dbd0 100644 --- a/camelot/parsers/lattice.py +++ b/camelot/parsers/lattice.py @@ -14,7 +14,6 @@ import pandas as pd from .base import BaseParser from ..core import Table -from ..ext.ghostscript import Ghostscript from ..utils import (scale_image, scale_pdf, segments_in_bbox, text_in_bbox, merge_close_lines, get_table_index, compute_accuracy, compute_whitespace) @@ -184,6 +183,8 @@ class Lattice(BaseParser): return t def _generate_image(self): + from ..ext.ghostscript import Ghostscript + self.imagename = ''.join([self.rootname, '.png']) gs_call = '-q -sDEVICE=png16m -o {} -r300 {}'.format( self.imagename, self.filename)