Closed Plurmo closed 2 years ago
Hello, I'm curious about what would be causing the issue here, seeing that grequests actually does run gevent.monkey.patch_all
upon being imported, (with theading and select patching off) before importing anything else that could trigger the ssl error.
Does requests-html work for you without having to run gevent.monkey patch? For example:
>>> from requests_html import HTMLSession
>>> session = HTMLSession()
>>> session.get('https://1.1.1.1')
<Response [200]>
Thank you for bringing my attention to this! I might have to update my other active projects if this is an issue.
I found out the problem. I have an extension in my ide that reorganizes the order of imports. This was causing the issue. Sorry for the trouble.
- Using Windows 10
Issue
I had an issue when trying to run the code. After I entered the URL into the console, an error message appeared: "Request connection failed. Exiting..."
Output
I then removed the try-except statement from the code @ Line 88 and ran it again. This was the error I received: "RecursionError: maximum recursion depth exceeded"
Output:
How-To Fix
I then went on StackOverflow here (first solution) and found out that I needed to add these two lines of code at the top of the code:
After inserting those two lines at the top of the code, everything seems to work fine.
Conclusion
I don't know why the code isn't working before the fix. I thought I would just let you know here and perhaps help others who might have the same issue. I have to say, I love this program. It's working great and I appreciate your time and effort.