Your question is off-topic, next time you have a non-Sage question ask it on stackexchange, for example. I take it you are not in the correct directory when calling os.system. You should instruct latex to not stop for errors if you call it programmatically, for example pdflatex -interaction=batchmode. Read the man page for more information.