[英]python error codecs.charmap_encode(input,errors,encoding_map) UnicodeEncodeError: 'charmap' codec can't encode characters
I am running sparql query to people's name from dbpedia for a give movie After getting data I am displaying name as well as putting into Mysql I am getting normal names but at one pointit threw an error 我正在从dbpedia运行sparql查询人们的名字以观看电影。获取数据后,我正在显示名称并输入Mysql,我得到的是普通名称,但有一次它抛出了错误
I got an error: 我收到一个错误:
Traceback (most recent call last):
File "TestSparql.py", line 172, in <module>
print person_Name
File "C:\Python27\Lib\encodings\cp437.py", line 12, in encode
return codecs.charmap_encode(input,errors,encoding_map)
UnicodeEncodeError: 'charmap' codec can't encode characters in position 16-21: character maps to <undefined>
could some one explain what this error means and why it might have come? 有人可以解释这个错误的含义以及为什么会发生吗?
That error means that Python is not able to encode as unicode your strings. 该错误意味着Python无法将您的字符串编码为unicode。 Further details at http://wiki.python.org/moin/UnicodeEncodeError 有关更多详细信息, 请参见http://wiki.python.org/moin/UnicodeEncodeError
In order to help you, many details are missing: 为了帮助您,许多细节丢失了:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.