As pointed by the flask doc[1], we should replace resp.data.decode('utf8') with resp.get_data(as_text=True)).
resp.data.decode('utf8')
resp.get_data(as_text=True))
http://flask.pocoo.org/docs/0.12/api/#flask.Response.data
Metadata Update from @qwan: - Issue assigned to qwan
see #182
Commit 638c7f77 fixes this issue