Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

博主您好,想问您关于编码格式运行报错的问题,按照网上的方法改了很多次,还是出错。 #39

Open
ma-qianqian opened this issue May 14, 2020 · 1 comment

Comments

@ma-qianqian
Copy link

Traceback (most recent call last):
File "train.py", line 87, in
test_input(model,sess,word2id,id2tag,batch_size)
File "/mnt/ChineseNER-master/tensorflow/utils.py", line 169, in test_input
entity = get_entity(text,pre[0],id2tag)
File "/mnt/ChineseNER-master/tensorflow/utils.py", line 40, in get_entity
entity=id2tag[y[i][j]][1:]+':'+x[i][j]
File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 in position 0: unexpected end of data

@cbzhang86
Copy link

换成py3的版本 下面有代码的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants