에러

File "....py", line 1SyntaxError: Non-ASCII character '\xed' in file ....py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

integerJI 2020. 9. 12. 22:21

 

vscode로 *.py 프로그램을 python으로 실행 시킬때 생기는 오류 입니다.

 

 

 

해당 원인은 주석처리로 되어있는 한글을 못읽어 발생하는 오류인데요

 

 

# -*- coding: utf-8 =*=

 

이렇게 첫 줄에 # -*- coding: utf-8 =*=을 넣어주면 해결됩니다. (주석을 풀지 말아주세요)