Python – 한글로 주석 남기면 실행 안되는 현상(cannot execute app if write Korean as comment)

Read Time:15 Second

한글로 코멘트를 남겼는데 다음과 같은 서버 에러가 발생했다.

HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

검색해서 Using Python with Chinese, Japanese and Korean 라는 글을 찾았고, 코드를 다음과 같이 하니 문제없이 실행되었다.

#!/usr/bin/env python
# -*- coding: utf-8 -*-

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.