warm up instances need for encoding declared

31 views
Skip to first unread message

Chuy Cepeda

unread,
Aug 12, 2015, 4:30:59 PM8/12/15
to Google App Engine
Hello, just wanted to share something I just experienced.

I have an appengine app running on python and for several notifications in spanish I use a messages.py file which is loaded in almost every handler. This file gave me no issues given it wasn't containing any specification for encoding. It consists in several lines practically identical to the following:

user_pass_mismatch = unicode('El usuario y contraseña no coinciden. Por favor intenta de nuevo.','utf-8')

It gave me no issues while running my app for several months, but lately I just added a set of warmup requests and it started giving 500 errors all the way because of:

SyntaxError: Non-ASCII character '\xc3' in file messages.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

Of course, adding the header # -*- coding: utf-8 -*- solved the issue, but the weird behavior is that non-resident (non warmup) instances caused no trouble even they didn't specified the encoding declaration.

Best,

Chuy 

Chuy Cepeda

unread,
Aug 13, 2015, 2:14:42 AM8/13/15
to Google App Engine
I thinks this was more related to an update from appengine backend.

Another of my projects without warm up requests crashed the same and fixed the same. It was working previously with no inconvenient and suddenly both projects threw 500's because of this encoding declaration in-between the last two days.

.
CC
Reply all
Reply to author
Forward
0 new messages