doc2vec_tf
doc2vec_tf copied to clipboard
Unicode Error- text file
Any idea what I might be doing wrong?
UnicodeDecodeError Traceback (most recent call last)
//ms/dist/python/PROJ/core/3.4.4/exec/lib/python3.4/encodings/ascii.py in decode(self, input, final) 24 class IncrementalDecoder(codecs.IncrementalDecoder): 25 def decode(self, input, final=False): ---> 26 return codecs.ascii_decode(input, self.errors)[0] 27 28 class StreamWriter(Codec,codecs.StreamWriter):
UnicodeDecodeError: 'ascii' codec can't decode byte 0x92 in position 172: ordinal not in range(128)
I would try
file = open(f, encoding='utf-8')
instead of
file = open(f)