I have the same problem, maybe because of the training data problem, you can try to UTF-8 encoding to UTF-8-SIG
raw_text = file_path.read_text(encoding='UTF-8-sig').strip()

Because UTF-8 may cause an extra \ufeff character in the encoded data