Skip to content

Commit

Permalink
Fix webpdf test on Python 3.12 (#2088)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Dec 26, 2023
1 parent 1562531 commit a3a069c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nbconvert/exporters/webpdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit a3a069c

Please sign in to comment.