-
-
Notifications
You must be signed in to change notification settings - Fork 888
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
python3.7 and eventlet0.25 exception #1011
Comments
In general I've seen lots of problems when trying to work with eventlet and SSL together. If at all possible, I recommend that you terminate the SSL connection before the request reaches the server. I use nginx as reverse proxy for SSL termination. This particular error has already been filed as an eventlet bug: eventlet/eventlet#526. |
Thank you for your response! I will be try. |
Indeed the issue is with I decorated my Flask's password authentication with a Google reCAPTCHA decorator which basically sends a some data to Google's servers over SSL. This is the decorator: def verify_recaptcha(f):
@wraps(f)
def decorated_function(*args, **kwargs):
g.recaptcha_valid = None
if (
request.method == "POST"
and current_app.config["RECAPTCHA_SITE_KEY"]
and current_app.config["RECAPTCHA_SECRET_KEY"]
):
data = request.get_json() if request.get_json() else request.data
recaptcha_token = data.get("recaptcha_token")
if recaptcha_token:
r = requests.post(
"https://www.google.com/recaptcha/api/siteverify",
data={
"secret": current_app.config["RECAPTCHA_SECRET_KEY"],
"response": recaptcha_token,
"remoteip": request.access_route[0],
},
)
result = r.json()
g.recaptcha_valid = result.get("success") or False
else:
g.recaptcha_valid = False
return f(*args, **kwargs)
return decorated_function As soon as I switched over to |
I have the same problem. python version: 3.7.1 when executing flask-mail mail.send(Message) File "C:\GitHub*.com\back-end*_celery.py", line 16, in i just del the eventlet\green\ssl.py
|
Just as an FYI to anyone else -- I actually was terminating SSL at Nginx, so for a second I was confused as to why I was getting this error. But then I realized that the managed Redis db I'm using for orchestration between @miguelgrinberg Do you have a recommendation for a workaround that doesn't involve just communicating with Redis unencrypted? I'm currently running |
@acnebs I don't have any workarounds, sorry. The issue is currently being worked on, so hopefully a fix will be available soon. |
Python 3.8. The following configuration gave an issue for me.
after downgrading to Posting this just if someone comes here from Google (like me was). |
Hm I have same dependencys except the requests I do not have at all.... Nevertheless the same error occurs for me. I also removed ssl.py and now everything works.... |
Hi! miguel
official doc recommend eventlet, but I get into trobute.
environment
exception:
eventlet/eventlet#526 (comment)
Is there any good way? or switch to gevent
The text was updated successfully, but these errors were encountered: