← Back to team overview

sikuli-driver team mailing list archive

[Question #147449]: Problem using os.system()

 

New question #147449 on Sikuli:
https://answers.launchpad.net/sikuli/+question/147449

I'm experiencing some problem using os.system()

this is my code:
import os

os.system('taskkill /f /im notepad.exe')

this is the error message I'm getting:
[error] Stopped 
[error] An error occurs at line 3 
[error] Error message: Traceback (most recent call last):  
File "C:\Users\ADMINI~1\AppData\Local\Temp\sikuli-tmp4213322176460126939.py", line 3, in    
os.system('taskkill /f /im notepad.exe')  
File "C:\Program Files (x86)\Sikuli X\sikuli-script.jar\Lib\os.py", line 726, in system  
File "C:\Program Files (x86)\Sikuli X\sikuli-script.jar\Lib\subprocess.py", line 456, in call  
File "C:\Program Files (x86)\Sikuli X\sikuli-script.jar\Lib\subprocess.py", line 755, in __init__  
File "C:\Program Files (x86)\Sikuli X\sikuli-script.jar\Lib\subprocess.py", line 1240, in _execute_child 
TypeError: unsupported operand type(s) for +: 'NoneType' and 'list'


Similar thing happens when I try to use os.system to execute a batch file. Do you know what the problem is?
The strange thing is that this worked once, then it stopped working again.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.