From afd165000c1661a9cca117a4844ad3f89d926fdb Mon Sep 17 00:00:00 2001 From: Matthias Baumgartner Date: Mon, 16 Jan 2023 20:53:39 +0100 Subject: unsupported file format exception --- bsie/lib/pipeline.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bsie/lib/pipeline.py') diff --git a/bsie/lib/pipeline.py b/bsie/lib/pipeline.py index e5ce1b7..02119bc 100644 --- a/bsie/lib/pipeline.py +++ b/bsie/lib/pipeline.py @@ -126,6 +126,8 @@ class Pipeline(): # get content content = rdr(path) if rdr is not None else None + #logger.info('extracted %s from %s', rdr, path) + # apply extractors on this content for ext in extrs: try: @@ -137,6 +139,11 @@ class Pipeline(): # critical extractor failure. logger.error('%s failed to extract triples from content: %s', ext, err) + except errors.UnsupportedFileFormatError as err: + # failed to read the file format. skip. + #logger.warning('%s could not process the file format of %s', rdr, err) + pass + except errors.ReaderError as err: # failed to read any content. skip. logger.error('%s failed to read content: %s', rdr, err) -- cgit v1.2.3