You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Page.exposeFunction is called, an exception occurs:
File "pyppeteer\page.py", line 610, in exposeFunction
await asyncio.wait([_evaluate(frame, expression) for frame in self.frames])
File "asyncio\tasks.py", line 415, in wait
TypeError: Passing coroutines is forbidden, use tasks explicitly.
My suggestion:
# file: page.py exposeFunction()
# before
await asyncio.wait([_evaluate(frame, expression) for frame in self.frames])
# after
loop = asyncio.get_event_loop()
await asyncio.wait([loop.create_task(_evaluate(frame, expression)) for frame in self.frames])
The text was updated successfully, but these errors were encountered:
Same bug. Very clear, that this had to happen - Passing coroutines was deprecated and has been removed in 3.11.
Python 3.11
pyppeteer: 1.0.2
OS: MacOS 14.0
OS: Windows 10 22H2 19045.3086 x64
Python 3.11.4 x64
pyppeteer: 1.0.2
When Page.exposeFunction is called, an exception occurs:
My suggestion:
The text was updated successfully, but these errors were encountered: