当我当时使用pickle.load
加载文件时,我将面临此错误。
with open("tfidf_vectorizer", mode='r+b') as handle:
tfidf_vectorizer = pickle.load(handle)
unicodedecodeerror:'ascii'编解码器无法解码字节0xdb。 0:序数不在范围内(128(
在读取文件时尝试设置编码。
ex:
with open("tfidf_vectorizer", mode='r+b', encoding='utf-8') as handle:
tfidf_vectorizer = pickle.load(handle)