You get this kind of error message only if python file was closed from the outside, i.e.,not from the file objects close() :
>>> f = open(".bashrc")
>>> del f
close failed in file object destructor:
IOError: [Errno 9] Bad file descriptor
In the above code, del f line will delete the last reference to the file object, Ultimately file.__del__ will be called.
The Internal state indicates that the file is still open since f.close() was never called, So here someone tries to close the file, that someone is destructor here. Later, OS throws an error because of the attempt for closing the file, which is not open.
Since os.system() does not create any python file object, It doesn't look like system() call was the origin of the error
Are you interested to learn Python, then Check out: Python training course