soyuka / pidusage

Cross-platform process cpu % and memory usage of a PID
MIT License
512 stars 55 forks source link

Command "wmic PROCESS 11756 get workingsetsize,usermodetime,kernelmodetime" failed with error Error: spawn wmic ENOENT #90

Closed wgd99 closed 5 years ago

wgd99 commented 5 years ago

Got this error message when trying open python jupyter window from Vs Code python extension. VS code 1.36.1, OS windows 10 1903

 console.ts:134 [Extension Host] [pidusage] Command "wmic PROCESS 11756 get workingsetsize,usermodetime,kernelmodetime" failed with error Error: spawn wmic ENOENT  at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)   at onErrorNT (internal/child_process.js:407:16) at process._tickCallback (internal/process/next_tick.js:63:19)
t.log @ console.ts:134
console.ts:134 [Extension Host] Python Extension: (pidusage) Error: 
Wed Jul 17 2019 21:19:18 GMT-0400  Wmic errored, please open an issue on https://github.com/soyuka/pidusage with this message.
Command was "wmic PROCESS 11756 get workingsetsize,usermodetime,kernelmodetime" 
 System informations: 
 - release: 10.0.18362 
 - type Windows_NT 
Wmic reported no errors (stderr empty).
Wmic exited with code -4058.
Stdout was empty
    at ChildProcess.<anonymous> (c:\apps\VSCode\data\extensions\ms-python.python-2019.6.24221\out\client\extension.js:68:96853)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:962:16)
    at Socket.ChildProcess.spawn.stream.socket.on (internal/child_process.js:381:11)
    at Socket.emit (events.js:182:13)
    at Pipe.Socket._destroy._handle.close (net.js:606:12)
t.log @ console.ts:134
soyuka commented 5 years ago

Mhh according to https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--4000-5999- your error means:

An element already exists and was not replaced.

Are you sure that the process was running? IMO this issue should go on the python jupyter repository not here.