add: redirection des journaux
Browse files
webui.py
CHANGED
@@ -40,13 +40,18 @@ def _ensure_playwright():
|
|
40 |
# cheap when the browser is already present.
|
41 |
try:
|
42 |
subprocess.run(
|
43 |
-
[
|
44 |
check=True,
|
45 |
-
stdout=subprocess.
|
46 |
stderr=subprocess.STDOUT,
|
47 |
)
|
48 |
except Exception as err: # pylint: disable=broad-except
|
49 |
-
logging.warning("Playwright
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
|
52 |
# ---------------------------------------------------------------------------
|
|
|
40 |
# cheap when the browser is already present.
|
41 |
try:
|
42 |
subprocess.run(
|
43 |
+
["playwright", "install", "--with-deps", "chromium"],
|
44 |
check=True,
|
45 |
+
stdout=subprocess.PIPE,
|
46 |
stderr=subprocess.STDOUT,
|
47 |
)
|
48 |
except Exception as err: # pylint: disable=broad-except
|
49 |
+
logging.warning("Playwright install with deps failed: %s", err)
|
50 |
+
# Fallback: try without system deps (may succeed in HF image)
|
51 |
+
try:
|
52 |
+
subprocess.run(["playwright", "install", "chromium"], check=True)
|
53 |
+
except Exception as err2: # pylint: disable=broad-except
|
54 |
+
logging.error("Playwright browser installation ultimately failed: %s", err2)
|
55 |
|
56 |
|
57 |
# ---------------------------------------------------------------------------
|