cnn_text_classification
cnn_text_classification copied to clipboard
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 894: character maps to <undefined>
im using Anaconda 3,python 3.5 on windows
I had a similar error where ascii codec couldn't decode unicode characters in the file - solved it by reading file as binary and decoding it to ascii. Used the following code for all of the data files with open(law_data_file, 'rb') as unicodefile: ufile = unicodefile.read() asciitext = ufile.decode('ascii','ignore') law_examples = asciitext.splitlines()
Hope this helps solve your problem.