SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
파일 경로에 의해서 나타난 오류이다.
수정 전 파일경로는 "C:\Users\DM10\P-code\data1.txt" 이랬는데
여기서 '\'를 하나씩 더 붙여줘서 "C:\\Users\\DM10\\P-code\\data1.txt" 이런 식으로 수정하면
코드가 정상적으로 실행될 것이다.
'Programming Language > Python' 카테고리의 다른 글
| 문자열포맷 (0) | 2022.09.06 |
|---|---|
| Python for Beginner 10장 연습문제 (1) | 2020.06.14 |