Skip to content

grequests conflicts with selenium #180

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

Open
KiddoLin opened this issue Dec 5, 2024 · 0 comments
Open

grequests conflicts with selenium #180

KiddoLin opened this issue Dec 5, 2024 · 0 comments

Comments

@KiddoLin
Copy link

KiddoLin commented Dec 5, 2024

version
python: 3.9.1
grequests: 0.7.0
requests: 2.32.3
selenium: 4.23.1

1.When grequests is imported and then selenium is imported, the following error message is displayed:

import grequests
import requests
from selenium import webdriver

error: cannot switch to a different thread (which happens to have exited)

2.When selenium is imported and then grequests is imported, the following error message is displayed:

from selenium import webdriver
import grequests
import requests

error: RecursionError('maximum recursion depth exceeded')

At the same time command line output

\.venv\lib\site-packages\grequests.py:22: MonkeyPatchWarning: 
Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. 
It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. 
See https://github.com/gevent/gevent/issues/1016. 
Modules that had direct imports (NOT patched): ['urllib3.util.ssl_  (.venv\\lib\\site-packages\\urllib3\\util\\ssl_.py)', 
'urllib3.util (.venv\\lib\\site-packages\\urllib3\\util\\__init__.py)'].
  curious_george.patch_all(thread=False, select=False)
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

No branches or pull requests

1 participant