回答編集履歴
1
追記
test
CHANGED
@@ -1 +1,25 @@
|
|
1
1
|
``path=pathlib.Path("C:\Users(ユーザー名)\Desktop")``の``\``を``\``か``/``に変更しましょう。
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
---
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
【NGの場合】
|
10
|
+
|
11
|
+
path = pathlib.Path("C:\Users\a\Desktop")
|
12
|
+
|
13
|
+
File "<stdin>", line 1
|
14
|
+
|
15
|
+
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in positio
|
16
|
+
|
17
|
+
n 2-3: truncated \UXXXXXXXX escape
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
【OKの場合】
|
22
|
+
|
23
|
+
path = pathlib.Path("C:\Users\a\Desktop")
|
24
|
+
|
25
|
+
path = pathlib.Path("C:/Users/a/Desktop")
|