Why is this one line crashing my script? : I have a script that works fine when in a .pyw, but when converted to an .exe, I've found that this one single line seems to crash the program:

`firstplan = subprocess.check_output(["powercfg", "-list"], shell=True ).split('\n')[3]`

Does anybody have any idea why? If I comment it out the program doesn't crash. I have two other very similar lines.