Boto: SSL: CERTIFICATE_VERIFY_FAILED] on s3

Created on 2 May 2016  路  3Comments  路  Source: boto/boto

I'm trying to upload files to my S3 bucket and I'm getting this error. I tried using boto3 and it worked fine.

    self.name = self.storage.save(name, content, max_length=self.field.max_length)
  File "/usr/local/lib/python3.5/site-packages/django/core/files/storage.py", line 53, in save
    name = self.get_available_name(name, max_length=max_length)
  File "/usr/local/lib/python3.5/site-packages/storages/backends/s3boto.py", line 515, in get_available_name
    return super(S3BotoStorage, self).get_available_name(name, max_length)
  File "/usr/local/lib/python3.5/site-packages/django/core/files/storage.py", line 89, in get_available_name
    while self.exists(name) or (max_length and len(name) > max_length):
  File "/usr/local/lib/python3.5/site-packages/storages/backends/s3boto.py", line 446, in exists
    return k.exists()
  File "/usr/local/lib/python3.5/site-packages/boto/s3/key.py", line 539, in exists
    return bool(self.bucket.lookup(self.name, headers=headers))
  File "/usr/local/lib/python3.5/site-packages/boto/s3/bucket.py", line 143, in lookup
    return self.get_key(key_name, headers=headers)
  File "/usr/local/lib/python3.5/site-packages/boto/s3/bucket.py", line 193, in get_key
    key, resp = self._get_key_internal(key_name, headers, query_args_l)
  File "/usr/local/lib/python3.5/site-packages/boto/s3/bucket.py", line 200, in _get_key_internal
    query_args=query_args)
  File "/usr/local/lib/python3.5/site-packages/boto/s3/connection.py", line 668, in make_request
    retry_handler=retry_handler
  File "/usr/local/lib/python3.5/site-packages/boto/connection.py", line 1071, in make_request
    retry_handler=retry_handler)
  File "/usr/local/lib/python3.5/site-packages/boto/connection.py", line 1030, in _mexe
    raise ex
  File "/usr/local/lib/python3.5/site-packages/boto/connection.py", line 943, in _mexe
    request.body, request.headers)
  File "/usr/local/lib/python3.5/http/client.py", line 1083, in request
    self._send_request(method, url, body, headers)
  File "/usr/local/lib/python3.5/http/client.py", line 1128, in _send_request
    self.endheaders(body)
  File "/usr/local/lib/python3.5/http/client.py", line 1079, in endheaders
    self._send_output(message_body)
  File "/usr/local/lib/python3.5/http/client.py", line 911, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.5/http/client.py", line 854, in send
    self.connect()
  File "/usr/local/lib/python3.5/http/client.py", line 1237, in connect
    server_hostname=server_hostname)
  File "/usr/local/lib/python3.5/ssl.py", line 376, in wrap_socket
    _context=self)
  File "/usr/local/lib/python3.5/ssl.py", line 747, in __init__
    self.do_handshake()
  File "/usr/local/lib/python3.5/ssl.py", line 983, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/local/lib/python3.5/ssl.py", line 628, in do_handshake
    self._sslobj.do_handshake()
SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)

All 3 comments

Ran into this today as well. Switched to python2 as a workaround.

Is this still open? The solution by @BossGrand worked for me on python3.6

Was this page helpful?
0 / 5 - 0 ratings