Fix #104: DeepSearch fails with Playwright async context manager error ('__aexit__' missing) #124
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "typosaurus/ticket-104"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Resolves #104.
Plan
Plan
Modify one file only:
devplacepy/services/jobs/deepsearch/crawl.py. Two functions need the same structural fix – replace manual context‑manager calls withasync with.1.
_render_with_playwright(around lines 178–197)Current pattern (simplified):
Replace with:
__aenter__()/__aexit__()calls.try/finallyforbrowser.close().try/exceptremains to catch launch/render errors exactly as before.2.
crawl()(around lines 303–309, 396–400)Current pattern:
Replace with:
__aexit__()call.async withensures the context manager is properly exited even if an exception occurs.finallyblock only needs to closebrowser.No other files need modification. The
isslop/browser.pycode is already correct and is left untouched.Definition of Done
devplacepy/services/jobs/deepsearch/crawl.pyhas been edited per the plan above. No other files are changed.python -m py_compile devplacepy/services/jobs/deepsearch/crawl.pyexits 0.test_answer_is_grounded_and_cited(intests/unit/services/deepsearch/chat.py) passes – this test was previously failing only due to merge‑conflict contamination, not to the bug itself.'Playwright' object has no attribute '__aexit__'error.Opened automatically by Typosaurus.
Checkout
From your project repository, check out a new branch and test the changes.