Update app.py
Browse files
app.py
CHANGED
|
@@ -659,7 +659,10 @@ def run_playwright_action(action_data, prompt_generator, target_url):
|
|
| 659 |
|
| 660 |
finally:
|
| 661 |
if browser:
|
| 662 |
-
|
|
|
|
|
|
|
|
|
|
| 663 |
print("[AGENT] 🛑 Playwright Session Closed.")
|
| 664 |
# =========================
|
| 665 |
# Chat Endpoint (Text + Voice)
|
|
|
|
| 659 |
|
| 660 |
finally:
|
| 661 |
if browser:
|
| 662 |
+
try:
|
| 663 |
+
browser.close()
|
| 664 |
+
except Exception:
|
| 665 |
+
pass
|
| 666 |
print("[AGENT] 🛑 Playwright Session Closed.")
|
| 667 |
# =========================
|
| 668 |
# Chat Endpoint (Text + Voice)
|