본문 바로가기

나의 플랫폼/TensorFlow

[Python] UnicodeDecodeError: 'cp949' codec can't decode byte 0xe2 in position 6987: illegal multibyte sequence

336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

UnicodeDecodeError: 'cp949' codec can't decode byte 0xe2 in position 6987: illegal multibyte sequence



Python에서 파일을 열 경우 위와 같은 에러를 볼 경우가 있다.


이럴 경우 


with open(file, 'rt', encoding='UTF8')


위와 같이 파일을 열면 해결이 된다.


참고 하세요.


참조 : http://airpage.org/xe/language_data/20205