UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcf in position 4: invalid continuation byte

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcf in position 4: invalid continuation byte
 
 

import os
import time
import subprocess
if __name__ == "__main__":
print("keep xunlei running")
while 1:
_str = str(subprocess.check_output('tasklist'))
print(_str)
if _str.find('ThunderPortable.exe') == -1:
print("xunlei is crashed, restart")
os.spawnl(os.P_NOWAIT, r'C:/ThunderPortable/ThunderPortable.exe')
subprocess.Popen(["ThunderPortable.exe"])
else:
print("xunlei is running!")
time.sleep(30)

Has invited:

To reply to a question, please Login or registered