質問編集履歴
5
えらーメッセージを貼りました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -18,8 +18,6 @@
|
|
18
18
|
簡単な教科書の1つ目のサンプルプログラムですが回りません。大量のエラーメッセージが表示されます。
|
19
19
|
### 発生している問題・エラーメッセージ
|
20
20
|
|
21
|
-
```
|
22
|
-
エラーメッセージ
|
23
21
|
```Traceback (most recent call last):
|
24
22
|
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1317, in do_open
|
25
23
|
encode_chunked=req.has_header('Transfer-encoding'))
|
4
えらーメッセージを貼りました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -20,9 +20,7 @@
|
|
20
20
|
|
21
21
|
```
|
22
22
|
エラーメッセージ
|
23
|
-
|
24
|
-
コード
|
25
|
-
```
|
23
|
+
```Traceback (most recent call last):
|
26
24
|
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1317, in do_open
|
27
25
|
encode_chunked=req.has_header('Transfer-encoding'))
|
28
26
|
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1229, in request
|
@@ -67,11 +65,7 @@
|
|
67
65
|
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)>
|
68
66
|
|
69
67
|
コード
|
70
|
-
````ここに言語を入力
|
71
|
-
コード
|
72
68
|
```
|
73
|
-
コード
|
74
|
-
```
|
75
69
|
|
76
70
|
### 該当のソースコード
|
77
71
|
|
3
エラーメッセージを貼りました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -20,7 +20,9 @@
|
|
20
20
|
|
21
21
|
```
|
22
22
|
エラーメッセージ
|
23
|
+
|
24
|
+
コード
|
23
|
-
`````
|
25
|
+
`````Traceback (most recent call last):
|
24
26
|
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1317, in do_open
|
25
27
|
encode_chunked=req.has_header('Transfer-encoding'))
|
26
28
|
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1229, in request
|
@@ -63,9 +65,13 @@
|
|
63
65
|
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1319, in do_open
|
64
66
|
raise URLError(err)
|
65
67
|
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)>
|
66
|
-
|
68
|
+
|
67
69
|
コード
|
70
|
+
````ここに言語を入力
|
71
|
+
コード
|
68
72
|
```
|
73
|
+
コード
|
74
|
+
```
|
69
75
|
|
70
76
|
### 該当のソースコード
|
71
77
|
|
2
エラーメッセージを貼りました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -20,6 +20,51 @@
|
|
20
20
|
|
21
21
|
```
|
22
22
|
エラーメッセージ
|
23
|
+
``````Traceback (most recent call last):
|
24
|
+
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1317, in do_open
|
25
|
+
encode_chunked=req.has_header('Transfer-encoding'))
|
26
|
+
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1229, in request
|
27
|
+
self._send_request(method, url, body, headers, encode_chunked)
|
28
|
+
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1275, in _send_request
|
29
|
+
self.endheaders(body, encode_chunked=encode_chunked)
|
30
|
+
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1224, in endheaders
|
31
|
+
self._send_output(message_body, encode_chunked=encode_chunked)
|
32
|
+
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1016, in _send_output
|
33
|
+
self.send(msg)
|
34
|
+
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 956, in send
|
35
|
+
self.connect()
|
36
|
+
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1392, in connect
|
37
|
+
server_hostname=server_hostname)
|
38
|
+
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 412, in wrap_socket
|
39
|
+
session=session
|
40
|
+
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 853, in _create
|
41
|
+
self.do_handshake()
|
42
|
+
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1117, in do_handshake
|
43
|
+
self._sslobj.do_handshake()
|
44
|
+
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)
|
45
|
+
|
46
|
+
During handling of the above exception, another exception occurred:
|
47
|
+
|
48
|
+
Traceback (most recent call last):
|
49
|
+
File "/Users/kawanamiyuki/book-python-scraping-master/ch1/download-png1.py", line 10, in <module>
|
50
|
+
urllib.request.urlretrieve(url, savename)
|
51
|
+
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 247, in urlretrieve
|
52
|
+
with contextlib.closing(urlopen(url, data)) as fp:
|
53
|
+
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 222, in urlopen
|
54
|
+
return opener.open(url, data, timeout)
|
55
|
+
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 525, in open
|
56
|
+
response = self._open(req, data)
|
57
|
+
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 543, in _open
|
58
|
+
'_open', req)
|
59
|
+
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain
|
60
|
+
result = func(*args)
|
61
|
+
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1360, in https_open
|
62
|
+
context=self._context, check_hostname=self._check_hostname)
|
63
|
+
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1319, in do_open
|
64
|
+
raise URLError(err)
|
65
|
+
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)>
|
66
|
+
>>>
|
67
|
+
コード
|
23
68
|
```
|
24
69
|
|
25
70
|
### 該当のソースコード
|
1
codeの中にコードをいれました。できているでしょうか。
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,7 +1,4 @@
|
|
1
|
-
### 前提・実現したいこと
|
2
|
-
|
3
|
-
ここに質問の内容を詳しく書いてください。
|
4
|
-
# ライブラリの取り込み --- (※1)
|
1
|
+
```# ライブラリの取り込み --- (※1)
|
5
2
|
import urllib.request
|
6
3
|
|
7
4
|
# URLと保存パスを指定
|
@@ -12,7 +9,12 @@
|
|
12
9
|
# ダウンロード --- (※2)
|
13
10
|
urllib.request.urlretrieve(url, savename)
|
14
11
|
print("保存しました")
|
12
|
+
コード
|
13
|
+
```### 前提・実現したいこと
|
15
14
|
|
15
|
+
ここに質問の内容を詳しく書いてください。
|
16
|
+
|
17
|
+
|
16
18
|
簡単な教科書の1つ目のサンプルプログラムですが回りません。大量のエラーメッセージが表示されます。
|
17
19
|
### 発生している問題・エラーメッセージ
|
18
20
|
|