SDGCN icon indicating copy to clipboard operation
SDGCN copied to clipboard

UnicodeDecodeError: 'gbk' codec can't decode byte 0xa2 in position 1389: illegal multibyte sequence

Open Summer-1994 opened this issue 5 years ago • 1 comments

请问:运行时出现这种错误怎么解决呢

SDGCN-master\data_helpers.py in load_w2v(w2v_file, embedding_dim, is_skip) 127 w2v.append([0.] * embedding_dim) 128 cnt = 0 --> 129 for line in fp: 130 cnt += 1 131 line = line.split()

UnicodeDecodeError: 'gbk' codec can't decode byte 0xa2 in position 1389: illegal multibyte sequence

Summer-1994 avatar Dec 04 '19 01:12 Summer-1994

sorry,才看到。我运行的时候没有出现这个错误。你可以试着按如下方式改一下: 119行 fp = open(w2v_file,'r', encoding='UTF-8')

Pinlong-Zhao avatar Dec 18 '19 06:12 Pinlong-Zhao