From a3a069c9a10bb011911166c0f84b9edb1fef305d Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 26 Dec 2023 10:39:43 -0600 Subject: [PATCH] Fix webpdf test on Python 3.12 (#2088) --- nbconvert/exporters/webpdf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nbconvert/exporters/webpdf.py b/nbconvert/exporters/webpdf.py index 5129a724b..b80d27087 100644 --- a/nbconvert/exporters/webpdf.py +++ b/nbconvert/exporters/webpdf.py @@ -100,6 +100,7 @@ async def main(temp_file): "Please use '--allow-chromium-download' to allow downloading one," "or install it using `playwright install chromium`." ) + await playwright.stop() raise RuntimeError(msg) from e page = await browser.new_page() @@ -133,6 +134,7 @@ async def main(temp_file): pdf_data = await page.pdf(**pdf_params) await browser.close() + await playwright.stop() return pdf_data pool = concurrent.futures.ThreadPoolExecutor()