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

\0 causes freeze #41

Open
nokados opened this issue Apr 21, 2020 · 2 comments
Open

\0 causes freeze #41

nokados opened this issue Apr 21, 2020 · 2 comments

Comments

@nokados
Copy link

nokados commented Apr 21, 2020

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
Copy link
Contributor

Hello, Did you try to run MyStem binary on such data? If yes, what is the result?

@nokados
Copy link
Author

nokados commented May 1, 2020

MyStem works correctly

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

No branches or pull requests

2 participants