-
Notifications
You must be signed in to change notification settings - Fork 0
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
Work out error handling when calling R from subprocess. #49
Comments
Merged
I think with the However, you could do a bigger catch like... try:
recommended_pkgs = sp.Popen([Rcmd], stderr=sp.PIPE, stdout=sp.PIPE,
shell=True, encoding='utf-8')
try:
stdout, stderr = recommended_pkgs.communicate(timeout=15)
except TimeoutExpired:
recommended_pkgs.kill()
stdout, stderr = recommended_pkgs.communicate()
return stdout, stderr
except subprocess.CalledProcessError as err:
# There was an error - command exited with non-zero code
logger.error(err) |
It may be better to write functions for both. |
sdhutchins
added
Priority: Medium
Status: Available
Type: Bug
and removed
Priority: Medium
Status: Available
Type: Bug
labels
Jul 31, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this the only exception we might hit?
Originally posted by @santina in #42
The text was updated successfully, but these errors were encountered: