Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Route.abort not report handled #1458

Merged
merged 1 commit into from Jul 27, 2022
Merged

fix Route.abort not report handled #1458

merged 1 commit into from Jul 27, 2022

Conversation

x0day
Copy link
Contributor

@x0day x0day commented Jul 27, 2022

this PR fixes #1457, #1402

@mxschmitt mxschmitt requested a review from rwoll July 27, 2022 14:14
@rwoll rwoll merged commit 5f95476 into microsoft:main Jul 27, 2022
@rwoll
Copy link
Member

rwoll commented Jul 27, 2022

@x0day Thanks for the contribution. Looks like this was missed in the port.

@FatMauld
Copy link

Is this still an issue? I'm using 1.27.1.
If I add this to my code:
page.route(re.compile(r"(\.png$)|(\.jpg$)"), lambda route: route.abort())

I've verified images don't load which is desired but when the script finishes, I get a bunch of these:

Task was destroyed but it is pending!
task: <Task pending name='Task-666' coro=<Page._on_route() running at /home/username/.local/lib/python3.8/site-packages/playwright/_impl/_page.py:251> wait_for=<_GatheringFuture finished exception=CancelledError()>>
_GatheringFuture exception was never retrieved
future: <_GatheringFuture finished exception=CancelledError()>
asyncio.exceptions.CancelledError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Task was destroyed but it is pending! in route.abort()
4 participants