質問編集履歴

3

エラーコード2修正

2021/07/04 10:08

投稿

Rwight
Rwight

スコア63

test CHANGED
File without changes
test CHANGED
@@ -148,7 +148,7 @@
148
148
 
149
149
  data = imageToData('2.png')
150
150
 
151
- File "(省略)/Python1年生/Chapter 5/機械学習に挑戦しよう/predictDigits.py", line 12, in imageToData
151
+ File "(省略)/Python1年生/Chapter 5/機械学習に挑戦しよう/predictDigits.py", line 9, in imageToData
152
152
 
153
153
  numImage = numpy.asarray(grayImage, dtype = float)
154
154
 

2

エラーコード2追加

2021/07/04 10:08

投稿

Rwight
Rwight

スコア63

test CHANGED
File without changes
test CHANGED
@@ -137,3 +137,25 @@
137
137
  本書の通りに従い、[Python3](https://www.python.org/download/)(P.20〜22)をダウンロードを致しました。
138
138
 
139
139
  上手く伝わっていなかったら申し訳ありません。。。
140
+
141
+ ## エラーコード2
142
+
143
+ ```Error
144
+
145
+ Traceback (most recent call last):
146
+
147
+ File "(省略)/Python1年生/Chapter 5/機械学習に挑戦しよう/predictDigits.py", line 30, in <module>
148
+
149
+ data = imageToData('2.png')
150
+
151
+ File "(省略)/Python1年生/Chapter 5/機械学習に挑戦しよう/predictDigits.py", line 12, in imageToData
152
+
153
+ numImage = numpy.asarray(grayImage, dtype = float)
154
+
155
+ File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/PIL/Image.py", line 2912, in open
156
+
157
+ fp = builtins.open(filename, "rb")
158
+
159
+ FileNotFoundError: [Errno 2] No such file or directory: '2.png'
160
+
161
+ ```

1

文章追加(1)

2021/07/04 10:07

投稿

Rwight
Rwight

スコア63

test CHANGED
File without changes
test CHANGED
@@ -123,3 +123,17 @@
123
123
  では最後までお忙しい中ありがとうございました。
124
124
 
125
125
  失礼しました。
126
+
127
+
128
+
129
+ ### 追記
130
+
131
+
132
+
133
+ Pythonインストール方法
134
+
135
+ --
136
+
137
+ 本書の通りに従い、[Python3](https://www.python.org/download/)(P.20〜22)をダウンロードを致しました。
138
+
139
+ 上手く伝わっていなかったら申し訳ありません。。。