Description
We see frequent transient failures for the TexManager
in travis and http://stackoverflow.com/questions/40695296/strange-crash-after-saving-many-colormeshplots-using-matplotlib
I suspect what is going on here is that there is a race condition around the various system calls we are making. We capture the stdout from the various tex related processes, but do not caputer stderr (which I hope will have useful debugging information). We are using the (old) method of os.system
. The suggested way to do this is now the subprocess
module (https://www.python.org/dev/peps/pep-0324/). See https://docs.python.org/2/library/subprocess.html#replacing-os-system for comments on how to convert from os.system
.
The specific tasks for this issue:
- move from
os.system
tosubprocess.call
- capture stderr and include in exceptions
Tagging this as 'medium' difficulty because it is touching a rarely touched part of the code base and may require a good understanding of how subprocess calls work in python, but as new-contributor-friendly because it is a self-contained project on a relatively well tested set of functionality.