python
SyntaxError: Non-ASCII character '\xec' in file 해결
'김용환'
2017. 11. 7. 18:49
SyntaxError: Non-ASCII character '\xec' in file oncall-bot.py on line 50, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
이 에러는 한글 때문에 발생한 것이다. mac에는 문제 없으나 linux에서 발생했다.
code에 utf-8 인코딩 설정을 추가하니 더 이상 문제가 발생하지 않는다.
# -*- coding: utf-8 -*-