-
Notifications
You must be signed in to change notification settings - Fork 43
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
BrokenPipeError in long-running process #21
Labels
Comments
sorry for the late response and thanks for reporting this issue. I am currently also not sure how this can be fixed, but any ideas or better pull requests with fixes are welcome. |
I believe simple catching of BrokenPipeError and mysteminstance.close(), mysteminstance.start() can solve this. Just tried to kill mystem process and follow this steps, it helps. |
from what I see now, normally yes.
could you send a PR please
… On 19 Oct 2018, at 14:05, Kirill Vasin ***@***.***> wrote:
Wouldn't simple catching of BrokenPipeError and mysteminstance.close(), mysteminstance.start() solve this?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#21 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABY6vrUf28odQhOkSrOLNUjzWp_EjyGUks5umcAigaJpZM4TkOWd>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems that if the mystem process dies for some reason (e. g. OS kills it), the wrapper crashes with the BrokenPipeError. I think that such behavior is unwanted, but I am not sure this could be fixed easily. I fixed it in my long-running process with catching the BrokenPipeError on Mystem.lemmatize call and recreating a Mystem object if needed.
The traceback:
P. S. I have also noticed similar behavior in interactive Jupyter Notebook scenario. If you kill a cell which uses a Mystem object, later calls to its lemmatize methods lead to BrokenPipeError, so you need to recreate the object.
The text was updated successfully, but these errors were encountered: