Skip to content

TypeError: 'SSLCertVerificationError' object is not iterable #162

@zamirTo1

Description

@zamirTo1

Hey,
I'm running this command and getting:
github-backup $ORGANIZATION -P -t $ACCESS_TOKEN -o . --all -O -R $REPO

2020-10-20T15:42:30.277186: Backing up user XXXXXXX to /Users/Backup/
2020-10-20T15:42:30.277497: Requesting https://api.github.com/user?per_page=100&page=1
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 1319, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1230, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1276, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1225, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1004, in _send_output
    self.send(msg)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 944, in send
    self.connect()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1399, in connect
    self.sock = self._context.wrap_socket(self.sock,
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 1040, in _create
    self.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/github_backup/github_backup.py", line 519, in _get_response
    r = urlopen(request)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 542, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 1362, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/urllib/request.py", line 1322, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/github-backup", line 42, in <module>
    main()
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/github-backup", line 31, in main
    authenticated_user = get_authenticated_user(args)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/github_backup/github_backup.py", line 654, in get_authenticated_user
    data = retrieve_data(args, template, single_request=True)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/github_backup/github_backup.py", line 502, in retrieve_data
    return list(retrieve_data_gen(args, template, query_args, single_request))
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/github_backup/github_backup.py", line 457, in retrieve_data_gen
    r, errors = _get_response(request, auth, template)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/github_backup/github_backup.py", line 524, in _get_response
    log_warning(e.reason)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/github_backup/github_backup.py", line 86, in log_warning
    for msg in message:
TypeError: 'SSLCertVerificationError' object is not iterable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions