-
Notifications
You must be signed in to change notification settings - Fork 1.3k
ValueError: The future belongs to a different loop
when using CPD mode
#3725
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
Comments
I ran your example exactly as written, and I couldn't reproduce your issue. |
Hi @mdmintz, the minimume reproducible code is what I mentioned. |
Likely an issue with Jupyter Notebooks, which aren't an officially supported environment. Jupyter Notebooks have custom event loop code (specifically the event loop policy of the kernel), which is problematic for frameworks that use |
Thanks @mdmintz, I will test the solution. |
You could also try using the SeleniumBase async API: https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md#sb_sf_24 Eg: examples/cdp_mode/raw_async.py And maybe this format will work too: https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md#sb_sf_25 |
I tested SB CDP Sync API. No Selenium format, and that worked for me. |
It's likely due to the same Jupyter Notebooks bug affecting other frameworks. |
Description:
When attempting to retrieve cookies in CDP mode using SeleniumBase, I encountered the following error:
Reproducible Example:
Expected Behavior:
Should return a list of cookies from the specified URL without throwing an exception.
Environment:
SeleniumBase version: 4.38.0
Python version: 3.12.10
OS: MacOS 15.4.1
Browser: Chrome 136.0.7103.49 (Official Build) (arm64)
Let me know if additional details or logs are needed. Thanks!
The text was updated successfully, but these errors were encountered: