質問編集履歴
4
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,20 +14,4 @@
|
|
14
14
|
|
15
15
|
|
16
16
|
|
17
|
-
としていますが、実行するとFileNotFoundError:[Errno 2]とエラーメッセージが表示されてしまいます。
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
OSErrorやIOErrorなども試してみましたが上手くいきませんでした。
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
ご教授頂きたくよろしくお願いいたします。
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
17
|
♯Python3.8
|
3
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,12 +1,16 @@
|
|
1
|
+
```python
|
2
|
+
|
1
3
|
try:
|
2
4
|
|
3
|
-
with open(filePath) as
|
5
|
+
with open(filePath) as f:
|
4
6
|
|
5
|
-
|
7
|
+
処理1
|
6
8
|
|
7
|
-
|
9
|
+
except FileNotFoundError:
|
8
10
|
|
9
|
-
|
11
|
+
処理2
|
12
|
+
|
13
|
+
```
|
10
14
|
|
11
15
|
|
12
16
|
|
@@ -22,4 +26,8 @@
|
|
22
26
|
|
23
27
|
|
24
28
|
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
|
25
33
|
♯Python3.8
|
2
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
try:
|
2
2
|
|
3
|
-
|
3
|
+
with open(filePath) as f:
|
4
4
|
|
5
5
|
処理1
|
6
6
|
|
7
|
-
except FileNotFoundError :
|
7
|
+
except FileNotFoundError :
|
8
8
|
|
9
9
|
処理2
|
10
10
|
|
1
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
try:
|
2
2
|
|
3
|
-
with open(filePath) as f:
|
3
|
+
with open(filePath) as f:
|
4
4
|
|
5
|
-
処理1
|
5
|
+
処理1
|
6
6
|
|
7
7
|
except FileNotFoundError :
|
8
8
|
|
9
|
-
処理2
|
9
|
+
処理2
|
10
10
|
|
11
11
|
|
12
12
|
|