siikamiika / yomichan-mecab-installer

Other
4 stars 10 forks source link

RuntimeWarning: line buffering #1

Open shipurjan opened 4 years ago

shipurjan commented 4 years ago

I'm using Python 3.8.3 In mecab.py, line 47

def write_stdout(data):
    if sys.version_info[0] == 3:
        return sys.stdout.buffer.write(data)
    elif sys.version_info[0] == 2:
        return `sys.stdout.write(data)

I'm getting error

C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py:838: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdin = io.open(p2cwrite, 'wb', bufsize)
C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py:844: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
  self.stdout = io.open(c2pread, 'rb', bufsize)

I installed MeCab with UTF-8 encoding, if that matters.

siikamiika commented 3 years ago

I'm also seeing this on both Windows and Linux. It does work even with the error, but I think I should do something about it. Anyway usually this is hidden from the user if you just use mecab.py as the native component between MeCab and the browser. Installation happens from install_mecab_for_yomichan.py.