79233526

Date: 2024-11-28 10:55:40
Score: 3
Natty:
Report link

Not really an answer, but I step "more near" to the answer I think

I did read again the documentation here: Win32_Process

I made a few experiments (I am now total confused total)

BEFORE code line...

ret_val = process.Terminate()

...I made, in different run's, the following:

A print(str(process.Terminate))

B print(str(callable(process.Terminate)))

C print(str(type(process.Terminate)))

The 'results' was:

A

0

Execution failed!
com_error: SWbemObjectEx: 0x80041002 :: Nicht gefunden
com_error in subsequent call of "<user input of Main Library.Exec "Exec1">", line 28
    ret_val = process.Terminate()
  in file "C:\Program Files\Python311\Lib\site-packages\win32com\client\dynamic.py", line 634
    ret = self._oleobj_.Invoke(retEntry.dispid, 0, invoke_type, 1)

B

False

Execution failed!
com_error: SWbemObjectEx: 0x80041002 :: Nicht gefunden
com_error in subsequent call of "<user input of Main Library.Exec "Exec1">", line 28
    ret_val = process.Terminate()
  in file "C:\Program Files\Python311\Lib\site-packages\win32com\client\dynamic.py", line 634
    ret = self._oleobj_.Invoke(retEntry.dispid, 0, invoke_type, 1)

C

<class 'int'>

Execution failed!
com_error: SWbemObjectEx: 0x80041002 :: Nicht gefunden
com_error in subsequent call of "<user input of Main Library.Exec "Exec1">", line 28
    ret_val = process.Terminate()
  in file "C:\Program Files\Python311\Lib\site-packages\win32com\client\dynamic.py", line 634
    ret = self._oleobj_.Invoke(retEntry.dispid, 0, invoke_type, 1)

If I execute ONLY...

ret_val = process.Terminate()

...so I get, like in the past, this:

Execution failed! TypeError: 'int' object is not callable

Have perhaps now anybody an idea what could be the reason for the problem?

Reasons:
  • Blacklisted phrase (1): what could be
  • Long answer (-1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Fonso