nlpub/pymystem3

TypeError: a bytes-like object is required, not 'NoneType' in _analyze_impl

rcv911 opened this issue · 1 comments

Hi. I have a question.

I've got a bunch of large .csv files and parse it via multiprocessing Pool

res = [pool.apply_async(func=func, args=(file,)) for file in files]

So when I try do lemmatize(ru_text) I got exception on:
https://github.com/nlpub/pymystem3/blob/master/pymystem3/mystem.py#L370

sio.write(out)
TypeError: a bytes-like object is required, not 'NoneType'

I don't get it how https://github.com/nlpub/pymystem3/blob/master/pymystem3/mystem.py#L369 can read None? It because of stdout non-blocking?

out = self._procout.read()

Faced the same issue when using threads