UnicodeDecodeError: 'gbk' codec can't decode byte 0xaa in position 120: illegal multibyte sequence

An error occurred generating the corresponding 2007_train.txt: UnicodeDecodeError: ‘GBK’ codec can’t decode byte 0xAA in position 120: illegal multibyte sequence

The 2007_train.txt file should generate the location parameters and labels of the target. What I generated was an empty file.

This error might be raised, if unknown characters for the current encoding are found and changing the encoding might solve the issue as described here.

I’m not sure, if this error is raised by Keras or TensorFlow, which you are apparently using, but if so you might get a better answer on StackOverflow. :wink:

1 Like