Skip to content

Commit b9b1837

Browse files
committed
Improve error logging for screenshot failures in PlayWrightConverter
1 parent 64efc48 commit b9b1837

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

dataframe_image/converter/browser/playwright_converter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ def screenshot(self, html):
8686
page.wait_for_timeout(200)
8787
try:
8888
screenshot_bytes = locator.screenshot(timeout=SCREENSHOT_TIMEOUT)
89-
except Error:
90-
logger.warning("Locator screenshot timed out. Taking full page screenshot instead.")
89+
except Error as ex:
90+
logger.warning(f"Locator screenshot failed. Taking full page screenshot instead. Error: {ex}")
9191
screenshot_bytes = page.screenshot(timeout=SCREENSHOT_TIMEOUT)
9292
im = Image.open(BytesIO(screenshot_bytes))
9393
return im

0 commit comments

Comments
 (0)