From a2c158e43ecc87e5d4841568a9a2dc801c44092b Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Tue, 18 Aug 2020 19:09:41 -0400 Subject: [PATCH] catch OSErrors due to missing path --- archivebox/extractors/readability.py | 2 +- archivebox/extractors/singlefile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/archivebox/extractors/readability.py b/archivebox/extractors/readability.py index 219402b5..cf3d1e4c 100644 --- a/archivebox/extractors/readability.py +++ b/archivebox/extractors/readability.py @@ -99,7 +99,7 @@ def save_readability(link: Link, out_dir: Optional[str]=None, timeout: int=TIMEO # Check for common failure cases if (result.returncode > 0): raise ArchiveError('Readability was not able to archive the page', hints) - except Exception as err: + except (Exception, OSError) as err: status = 'failed' output = err finally: diff --git a/archivebox/extractors/singlefile.py b/archivebox/extractors/singlefile.py index 702e44a0..0178ca07 100644 --- a/archivebox/extractors/singlefile.py +++ b/archivebox/extractors/singlefile.py @@ -71,7 +71,7 @@ def save_singlefile(link: Link, out_dir: Optional[str]=None, timeout: int=TIMEOU if (result.returncode > 0): raise ArchiveError('SingleFile was not able to archive the page', hints) chmod_file(output) - except Exception as err: + except (Exception, OSError) as err: status = 'failed' output = err finally: