Skip to content
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

SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC #230

Open
bignellrp opened this issue Sep 1, 2021 · 1 comment
Open

SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC #230

bignellrp opened this issue Sep 1, 2021 · 1 comment

Comments

@bignellrp
Copy link

Im getting the following error when using gspread on docker. This error does not happen when using all the same python extension versions locally on my mac in vscode but happens almost daily when using this docker. I tried to find another docker with uwsgi, python3.8 and flask but this seems to be the only one so would be really handy to find out whats causing this or at least have a work around. I have contacted the gspread team who suggest its some kind of SSL error so maybe is related to the other issue open (#181)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "./routes/result.py", line 44, in result
result = results()
File "./services/get_spread.py", line 128, in init
results_table = wsr.get_all_values()
File "/usr/local/lib/python3.8/site-packages/gspread/utils.py", line 593, in wrapper
return f(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/gspread/models.py", line 884, in get_all_values
return self.get_values(**kwargs)
File "/usr/local/lib/python3.8/site-packages/gspread/utils.py", line 593, in wrapper
return f(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/gspread/models.py", line 857, in get_values
return fill_gaps(self.get(range_name, **kwargs))
File "/usr/local/lib/python3.8/site-packages/gspread/utils.py", line 593, in wrapper
return f(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/gspread/models.py", line 1136, in get
response = self.spreadsheet.values_get(range_name, params=params)
File "/usr/local/lib/python3.8/site-packages/gspread/models.py", line 221, in values_get
r = self.client.request('get', url, params=params)
File "/usr/local/lib/python3.8/site-packages/gspread/client.py", line 64, in request
response = getattr(self.session, method)(
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.8/site-packages/google/auth/transport/requests.py", line 480, in request
response = super(AuthorizedSession, self).request(
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='sheets.googleapis.com', port=443): Max retries exceeded with url: /v4/spreadsheets/1tyy_8sKM-N-JA6j1pASCO6_HRxvlhTuA3R0KysbVG9U/values/%27Dev%20Results%27 (Caused by SSLError(SSLError(1, '[SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2624)')))

@bignellrp
Copy link
Author

I'd like to add that ive switched to tiangologs meinheld docker and im no longer getting this error. docker run -t -i -e WEB_CONCURRENCY="1" -p 80:80 tiangolo/meinheld-gunicorn-flask

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