Closed beattyml1 closed 4 years ago
Got the following output
============================================================================================================ test session starts ============================================================================================================= platform darwin -- Python 3.6.6, pytest-5.2.1, py-1.8.0, pluggy-0.13.0 rootdir: /Users/matthew/dev/city-scrapers, inifile: setup.cfg collected 123 items / 1 errors / 122 selected =================================================================================================================== ERRORS =================================================================================================================== ______________________________________________________________________________________________ ERROR collecting tests/test_pitt_housing_opp.py _______________________________________________________________________________________________ /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py:1318: in do_open encode_chunked=req.has_header('Transfer-encoding')) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py:1239: in request self._send_request(method, url, body, headers, encode_chunked) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py:1285: in _send_request self.endheaders(body, encode_chunked=encode_chunked) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py:1234: in endheaders self._send_output(message_body, encode_chunked=encode_chunked) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py:1026: in _send_output self.send(msg) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py:964: in send self.connect() /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py:1400: in connect server_hostname=server_hostname) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py:407: in wrap_socket _context=self, _session=session) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py:814: in __init__ self.do_handshake() /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py:1068: in do_handshake self._sslobj.do_handshake() /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py:689: in do_handshake self._sslobj.do_handshake() E ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841) During handling of the above exception, another exception occurred: tests/test_pitt_housing_opp.py:8: in <module> from city_scrapers.spiders.pitt_housing_opp import PittHousingOppSpider city_scrapers/spiders/pitt_housing_opp.py:13: in <module> url = urllib.request.urlopen(json_url) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py:223: in urlopen return opener.open(url, data, timeout) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py:532: in open response = meth(req, response) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py:642: in http_response 'http', request, response, code, msg, hdrs) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py:564: in error result = self._call_chain(*args) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py:504: in _call_chain result = func(*args) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py:756: in http_error_302 return self.parent.open(new, timeout=req.timeout) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py:526: in open response = self._open(req, data) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py:544: in _open '_open', req) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py:504: in _call_chain result = func(*args) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py:1361: in https_open context=self._context, check_hostname=self._check_hostname) /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py:1320: in do_open raise URLError(err) E urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:841)> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ============================================================================================================== 1 error in 1.89s ==============================================================================================================
Added the lock file back - let's see if this works!
Fixed with /Applications/Python\ 3.6/Install\ Certificates.command on mac
/Applications/Python\ 3.6/Install\ Certificates.command
Another reference if windows os: here
Got the following output