第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Python 爬蟲初學,urlopen 出錯?

Python 爬蟲初學,urlopen 出錯?

totosspace 2019-04-07 19:04:28
代碼如下: import?urllib.request response?=?urllib.request.urlopen('https://www.python.org') print(type(response)) print(response.read().decode('utf-8'))錯誤信息如下:Traceback (most recent call last):? File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1317, in do_open? ? encode_chunked=req.has_header('Transfer-encoding'))? File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1229, in request? ? self._send_request(method, url, body, headers, encode_chunked)? File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1275, in _send_request? ? self.endheaders(body, encode_chunked=encode_chunked)? File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1224, in endheaders? ? self._send_output(message_body, encode_chunked=encode_chunked)? File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1016, in _send_output? ? self.send(msg)? File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 956, in send? ? self.connect()? File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1392, in connect? ? server_hostname=server_hostname)? File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 412, in wrap_socket? ? session=session? File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 853, in _create? ? self.do_handshake()? File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1117, in do_handshake? ? self._sslobj.do_handshake()ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)During handling of the above exception, another exception occurred:Traceback (most recent call last):? File "<input>", line 1, in <module>? File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile? ? pydev_imports.execfile(filename, global_vars, local_vars)? # execute the script? File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile? ? exec(compile(contents+"\n", file, 'exec'), glob, loc)? File "/Users/awake/PycharmProjects/untitled/venv/Hello.py", line 4, in <module>? ? response = urllib.request.urlopen('https://www.python.org')? File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 222, in urlopen? ? return opener.open(url, data, timeout)? File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 525, in open? ? response = self._open(req, data)? File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 543, in _open? ? '_open', req)? File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain? ? result = func(*args)? File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1360, in https_open? ? context=self._context, check_hostname=self._check_hostname)? File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1319, 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:1056)>
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 3890 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號