Error

[Error] UnicodeDecodeError: 'cp949' codec can't decode byte 0x80 in position 72: illegal multibyte sequence

HUR129 2022. 1. 30. 14:46

파이썬으로 text file 을 불러오거나 쓸 때 생기는 문제

encoding 방식을 지정해주면 해결된다

 

with open(out_file, "w") as f:
에서

with open(out_file, "w",encoding='utf-8') as f:

으로

encoding='utf-8'을 추가해주자