-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
- Python: 3.8
- Playwright: 1.8.0a1
- OS: MacOS Catalina
the following code failed to run in jupyter notebook envrionment
import playwright.sync_api
with playwright.sync_api.sync_playwright() as api:
pass
it gives error
---------------------------------------------------------------------------
Error Traceback (most recent call last)
<ipython-input-19-af4d5d3f125f> in <module>
1 import playwright.sync_api
----> 2 with playwright.sync_api.sync_playwright() as api:
3 pass
python3.8/site-packages/playwright/sync_api/_context_manager.py in __enter__(self)
65 self._connection.call_on_object_with_known_name("Playwright", callback_wrapper)
66
---> 67 dispatcher_fiber.switch()
68 playwright = self._playwright
69 playwright.stop = self.__exit__ # type: ignore
python3.8/site-packages/playwright/sync_api/_context_manager.py in greenlet_main()
41
42 if loop.is_running():
---> 43 raise Error(
44 """It looks like you are using Playwright Sync API inside the asyncio loop.
45 Please use the Async API instead."""
Error: It looks like you are using Playwright Sync API inside the asyncio loop.
Please use the Async API instead.
Metadata
Metadata
Assignees
Labels
No labels