\0 causes freeze
nokados opened this issue · 2 comments
nokados commented
If the input string contains \0 character, Mystem does not respond.
Code to reproduce:
from pymystem3 import Mystem
m = Mystem()
m.lemmatize('тест\u0000')
After that, the program freezes. No errors, no warnings. When I send KeyboardInterrupt (^C), I see the next Traceback:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/nokados/anaconda3/lib/python3.6/site-packages/pymystem3/mystem.py", line 250, in lemmatize
infos = self.analyze(text)
File "/home/nokados/anaconda3/lib/python3.6/site-packages/pymystem3/mystem.py", line 235, in analyze
result.extend(self._analyze_impl(line))
File "/home/nokados/anaconda3/lib/python3.6/site-packages/pymystem3/mystem.py", line 273, in _analyze_impl
select.select([self._procout_no], [], [])
KeyboardInterrupt
Python 3.6.5
pymystem3 0.1.5, 0.1.10 , 0.2.0 (all 3 were tested)
Mystem 3.0
alexanderpanchenko commented
Hello, Did you try to run MyStem binary on such data? If yes, what is the result?
nokados commented
MyStem works correctly