-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
Context:
- Playwright Version: 1.32.1
- Operating System: macos
- Python version: [e.g. 3.7, 3.9]
- Browser: all
Describe the bug
I'm running a gRPC server using a loop, and then using playwright to fetch some URL: https://github.com/hwchase17/langchain/blob/e3b7a20454cea592fc6d0a0d91c36206e8ad6790/langchain/document_loaders/url_playwright.py#L62
when the context is exiting, this error is thrown
RuntimeError: Set changed size during iteration
this is happening due to an old upstream bug in cpython python/cpython#80788
we need to refactor the context manager to close itself differently
for t in [t for t in tasks if not (t.done() or t.cancelled())]: |
TBH, I don't know why we even do that :O