aminghadersohi commented on code in PR #35063:
URL: https://github.com/apache/superset/pull/35063#discussion_r2369832221


##########
superset/utils/webdriver.py:
##########
@@ -71,6 +78,58 @@
     sync_playwright = None
 
 
+# Check Playwright availability at module level
+def check_playwright_availability() -> bool:
+    """
+    Comprehensive check for Playwright availability.
+
+    Verifies not only that the module is imported, but also that
+    browser binaries are installed and can be launched.
+    """
+    if sync_playwright is None:
+        return False
+
+    try:
+        # Try to actually launch a browser to ensure binaries are installed
+        with sync_playwright() as p:
+            browser = p.chromium.launch(headless=True)

Review Comment:
   Changed it to check if the browser binary exists first, only launches if 
that fails



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to