UnicodeEncodeError:'latin-1'编解码器无法对位置1360中的字符'\ u016​​b'进行编码:序数不在范围内(256)

时间:2016-05-12 15:22:33

标签: python utf-8 latin1

我打算打印数组eponym,但是我收到了这个错误:

  

UnicodeEncodeError:'latin-1'编解码器无法编码字符'\ u016​​b'   位置1360:序数不在范围内(256)

这是我的代码

with codecs.open(epoFitx,encoding="utf-8") as fitx:
    for line in fitx:
        line = line.strip()
        eponimo.insert(len(eponimo), line.lower())
        print("    ", eponimo)

这是我获得的:

  

['roux','tourette','sulzberger','mortimer','galeazzi','antley',   'henseleit','larsen','levret','bailey','schlemm','winegrad',   'hoover','klein','klatskin','uhl','codman','ober','b?hme',   'schonberg','anitschkow','c?stan','browne','albarran','ochsner',   'salzmann','cauchois','pette','michaelis','besredka','foix',   'bernhardt','cruchet','wilkins','benedict','pezzi','steinert',   'am?ndola','canga','oguchi','len?gre','arndt','bennett',   'bagolini','morrow','politzer','w?lfler','salomon','giaccai',   'dimitri','crowe','cockett','erdheim','steele']

0 个答案:

没有答案