UnicodeDecodeError:“ ascii”编解码器无法解码位置14的字节0xe2:GAE python中的序数不在range(128)中? [英] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 14: ordinal not in range(128) in GAE python?

查看:73
本文介绍了UnicodeDecodeError:“ ascii”编解码器无法解码位置14的字节0xe2:GAE python中的序数不在range(128)中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将python与Google Cloud Endpoints结合使用。我正在尝试从数据库中获取数据

I am using Google Cloud Endpoints with python. I am trying to fetch data from database what it is showing

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 14: ordinal not in range(128) error.

我遇到错误的字段是varchar,

The field for which I am getting error is varchar with

"BTTR â€" oct 01 2014 10:00 AM ESt
Primary issue â€" Want to activate the kaspersky 
Plan Sold â€" NA
Any commitment â€"Call back 
Transferred to tech â€" NA
Session ID â€"222479342 
Transaction ID (Order ID) â€"NA
PDF push on sale call â€"Na" data. Please help.


推荐答案

我使用

decode(encoding='unicode-escape',errors='strict')

这篇关于UnicodeDecodeError:“ ascii”编解码器无法解码位置14的字节0xe2:GAE python中的序数不在range(128)中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆