Help

Re: Getting SSL error when i am trying to access airtable using airtable-python-wrapper

Solved
Jump to Solution
1753 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Shever_Natsai
5 - Automation Enthusiast
5 - Automation Enthusiast

>>> a.get_all()
Traceback (most recent call last):
  File "/Users/snatsai/project/airtable/lib/python3.6/site-packages/urllib3/connectionpool.py", line 603, in urlopen
    chunked=chunked)
  File "/Users/snatsai/project/airtable/lib/python3.6/site-packages/urllib3/connectionpool.py", line 344, in _make_request
    self._validate_conn(conn)
  File "/Users/snatsai/project/airtable/lib/python3.6/site-packages/urllib3/connectionpool.py", line 843, in _validate_conn
    conn.connect()
  File "/Users/snatsai/project/airtable/lib/python3.6/site-packages/urllib3/connection.py", line 370, in connect
    ssl_context=context)
  File "/Users/snatsai/project/airtable/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 355, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 377, in wrap_socket
    _context=self)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 752, in __init__
    self.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 987, in do_handshake
    self._sslobj.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 633, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:645)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/snatsai/project/airtable/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/Users/snatsai/project/airtable/lib/python3.6/site-packages/urllib3/connectionpool.py", line 641, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/Users/snatsai/project/airtable/lib/python3.6/site-packages/urllib3/util/retry.py", line 399, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.airtable.com', port=443): Max retries exceeded with url: /v0/xxxxxxxxxxxxx/EDed (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:645)'),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/snatsai/project/airtable/lib/python3.6/site-packages/airtable/airtable.py", line 273, in get_all
    for records in self.get_iter(**options):
  File "/Users/snatsai/project/airtable/lib/python3.6/site-packages/airtable/airtable.py", line 237, in get_iter
    data = self._get(self.url_table, offset=offset, **options)
  File "/Users/snatsai/project/airtable/lib/python3.6/site-packages/airtable/airtable.py", line 175, in _get
    return self._request("get", url, params=processed_params)
  File "/Users/snatsai/project/airtable/lib/python3.6/site-packages/airtable/airtable.py", line 170, in _request
    response = self.session.request(method, url, params=params, json=json_data)
  File "/Users/snatsai/project/airtable/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/snatsai/project/airtable/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/Users/snatsai/project/airtable/lib/python3.6/site-packages/requests/adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.airtable.com', port=443): Max retries exceeded with url: /v0/xxxxxxxxxxxxxx/EDed (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:645)'),))
>>>
>>>
1 Solution

Accepted Solutions
Shever_Natsai
5 - Automation Enthusiast
5 - Automation Enthusiast

installing requests[security] module resolved the issue

pip install -U requests[security]

See Solution in Thread

2 Replies 2
Shever_Natsai
5 - Automation Enthusiast
5 - Automation Enthusiast

os= osx majave

python --version
Python 3.6.0a3

pip freeze
airtable-python-wrapper==0.12.0
certifi==2019.6.16
chardet==3.0.4
idna==2.8
requests==2.22.0
six==1.12.0
urllib3==1.25.3

Shever_Natsai
5 - Automation Enthusiast
5 - Automation Enthusiast

installing requests[security] module resolved the issue

pip install -U requests[security]