0

Hi I'm trying understand why I'm getting this error.

when I deploy my project on google appengine, getting error like below

SyntaxError: Non-ASCII character '\xea' in file /base/data/home/apps/s~frikijihyo/1.377756632466273994/app/controllers.py on line 32, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

my code: python

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

    flash(u'Korean 게시글을 작성했습니다.', 'success')
    return redirect(url_for('article_list'))

i wrote coding: utf-8.

what is 'character \xea'? how can i solve this problem?

tckmn
  • 57,719
  • 27
  • 114
  • 156
user3917240
  • 1
  • 1
  • 1

1 Answers1

2

what is 'character \xea'?

\xea is the first byte of the utf-8 encoding of '게'. It is the first non-ASCII byte in your source-code file.

how can i solve this problem?

Ensure that the "coding" comment is on one of the first two lines of the file. If the comment appears anywhere else, it has no effect.

Robᵩ
  • 163,533
  • 20
  • 239
  • 308