From be686ebcfccc28eef4608fec9714e82d9c1a282e Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Fri, 13 Oct 2023 22:41:54 +0200 Subject: [PATCH] double check if pdf is generated --- rendercv/rendering.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rendercv/rendering.py b/rendercv/rendering.py index e4b9ca4..b835cdb 100644 --- a/rendercv/rendering.py +++ b/rendercv/rendering.py @@ -420,6 +420,14 @@ def run_latex(latex_file_path: str) -> str: " open an issue on GitHub." ) + # check if the PDF file is generated: + if not os.path.exists(output_file_path): + raise FileNotFoundError( + f"The PDF file {output_file_path} couldn't be generated! If you can't" + " solve the problem, please try to re-install RenderCV, or open an issue" + " on GitHub." + ) + # remove the unnecessary files: for file_name in os.listdir(os.path.dirname(latex_file_path)): if (