[PYTHON] Mecab --UnicodeDecodeError:'utf8' codec can't decode byte

import MeCab
tagger = MeCab.Tagger('')

tagger.parse('') #This is important! !! !! !!

text = u'Let's play with MeCab!'
node = tagger.parseToNode(text)
while node:
    print(node.surface + '\t' + node.feature)
    node = node.next

reference: https://shogo82148.github.io/blog/2015/12/20/mecab-in-python3-final/

Recommended Posts

Mecab --UnicodeDecodeError:'utf8' codec can't decode byte
When codec can't decode byte appears in python
UnicodeDecodeError: What to do when'shift_jis' codec can't decode byte
UnicodeDecodeError:'ascii' codec can't decode byte 0xa4 in position 0: ordinal not in range (128)
UnicodeDecodeError:'utf-8' codec ca n’t decode byte 0x91 in position 1: invalid start byte
yum throws "UnicodeDecodeError:'ascii' codec can't decode byte 0xc3 in position 15: ordinal not in range (128)" error