Error While Checking Windows Updates using Python

Viewed 39

I am using Python 3.9.5,

Using the module

from windows_tools.updates import get_windows_updates

After importing, when I try to execute the command get_windows_updates()

Following is the error it's showing,

Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    get_windows_updates()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\windows_tools\updates\__init__.py", line 69, in get_windows_updates
    'operation': OPERATION_CODES[int(entry.Operation)],
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\win32com\client\dynamic.py", line 628, in __getattr__
    ret = self._oleobj_.Invoke(retEntry.dispid, 0, invoke_type, 1)
pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2145120257), None)

Can anyone help me out to resolve this please?

0 Answers
Related