WUA, Genpy.py error, searching for update
Published: May 13, 2024 - 11:05 AM
Good morning,
Following the extended weekend and the return of several users, the PCs in our network performed WUA searches (the first time in several days/two weeks). A portion of them (10-20 out of approximately 200 PCs) are displaying errors with messages like this:
"
"
After some searching on the forum, it seems to be a matter of clearing the cache. I haven't tried the commands given yet (thread from 2023). Is this still the way to fix this problem? Isn't there a way to prevent it from happening again?
Sincerely,
Following the extended weekend and the return of several users, the PCs in our network performed WUA searches (the first time in several days/two weeks). A portion of them (10-20 out of approximately 200 PCs) are displaying errors with messages like this:
"
Code: Select all
Ensure wuauserv Auto Update option is disabled
Download all updates
Scanning with windows updates rules:
{
"direct_download":false,
"default_allow":false,
"include_potentially_superseded_updates":false,
"filter":"Type='Software' or Type='Driver'",
"download_scheduling":"2h",
"install_scheduling":"4h",
"install_delay":"1h",
"postboot_delay":"10m"
}
Connecting to local update searcher using offline wsusscn2 file...
Offline Update searcher ready...
Bypassing scan, no change since last successful scan
Looking for updates with filter: Type='Software' or Type='Driver'
Waiting for WUA search to complete
WUA Search completed !
Done searching
re-enabling wuauserv previous state: 0
[Errno 2] No such file or directory: 'C:\\Windows\\TEMP\\gen_py\\3.8\\B596CC9F-56E5-419E-A622-E01BB457431Ex0x2x0\\ISearchResult.py.5824.temp'
Traceback (most recent call last):
File "C:\Program Files (x86)\wapt\lib\site-packages\win32com\client\gencache.py", line 233, in GetModuleForCLSID
__import__(sub_mod_name)
ModuleNotFoundError: No module named 'win32com.gen_py.B596CC9F-56E5-419E-A622-E01BB457431Ex0x2x0.ISearchResult'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files (x86)\wapt\waptservice\service.py", line 1935, in run
self.running_task.run()
File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 737, in run
self._run()
File "C:\Program Files (x86)\wapt\waptservice\enterprise.py", line 254, in _run
self.result = wua.download_updates(self.force, uuids=self.uuids)
File "C:\Program Files (x86)\wapt\waptwua\client.py", line 1595, in download_updates
self.scan_updates_status()
File "C:\Program Files (x86)\wapt\waptwua\client.py", line 1217, in scan_updates_status
for update in self.updates():
File "C:\Program Files (x86)\wapt\waptwua\client.py", line 1152, in updates
search_result = self.update_searcher().EndSearch(search_job)
File "C:\Windows\TEMP\gen_py\3.8\B596CC9F-56E5-419E-A622-E01BB457431Ex0x2x0\IUpdateSearcher3.py", line 48, in EndSearch
File "C:\Program Files (x86)\wapt\lib\site-packages\win32com\client\__init__.py", line 96, in Dispatch
return __WrapDispatch(dispatch, userName, resultCLSID, typeinfo, clsctx=clsctx)
File "C:\Program Files (x86)\wapt\lib\site-packages\win32com\client\__init__.py", line 37, in __WrapDispatch
klass = gencache.GetClassForCLSID(resultCLSID)
File "C:\Program Files (x86)\wapt\lib\site-packages\win32com\client\gencache.py", line 180, in GetClassForCLSID
mod = GetModuleForCLSID(clsid)
File "C:\Program Files (x86)\wapt\lib\site-packages\win32com\client\gencache.py", line 241, in GetModuleForCLSID
makepy.GenerateChildFromTypeLibSpec(sub_mod, info)
File "C:\Program Files (x86)\wapt\lib\site-packages\win32com\client\makepy.py", line 319, in GenerateChildFromTypeLibSpec
gen.generate_child(child, dir_path_name)
File "C:\Program Files (x86)\wapt\lib\site-packages\win32com\client\genpy.py", line 1049, in generate_child
self.file = self.open_writer(out_name)
File "C:\Program Files (x86)\wapt\lib\site-packages\win32com\client\genpy.py", line 786, in open_writer
return open(temp_filename, "wt", encoding=encoding)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Windows\\TEMP\\gen_py\\3.8\\B596CC9F-56E5-419E-A622-E01BB457431Ex0x2x0\\ISearchResult.py.5824.temp'
2 : No such file or directory
Traceback (most recent call last):
File "C:\Program Files (x86)\wapt\lib\site-packages\win32com\client\gencache.py", line 233, in GetModuleForCLSID
__import__(sub_mod_name)
ModuleNotFoundError: No module named 'win32com.gen_py.B596CC9F-56E5-419E-A622-E01BB457431Ex0x2x0.ISearchResult'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files (x86)\wapt\waptservice\service.py", line 1935, in run
self.running_task.run()
File "C:\Program Files (x86)\wapt\waptservice\waptservice_common.py", line 737, in run
self._run()
File "C:\Program Files (x86)\wapt\waptservice\enterprise.py", line 254, in _run
self.result = wua.download_updates(self.force, uuids=self.uuids)
File "C:\Program Files (x86)\wapt\waptwua\client.py", line 1595, in download_updates
self.scan_updates_status()
File "C:\Program Files (x86)\wapt\waptwua\client.py", line 1217, in scan_updates_status
for update in self.updates():
File "C:\Program Files (x86)\wapt\waptwua\client.py", line 1152, in updates
search_result = self.update_searcher().EndSearch(search_job)
File "C:\Windows\TEMP\gen_py\3.8\B596CC9F-56E5-419E-A622-E01BB457431Ex0x2x0\IUpdateSearcher3.py", line 48, in EndSearch
File "C:\Program Files (x86)\wapt\lib\site-packages\win32com\client\__init__.py", line 96, in Dispatch
return __WrapDispatch(dispatch, userName, resultCLSID, typeinfo, clsctx=clsctx)
File "C:\Program Files (x86)\wapt\lib\site-packages\win32com\client\__init__.py", line 37, in __WrapDispatch
klass = gencache.GetClassForCLSID(resultCLSID)
File "C:\Program Files (x86)\wapt\lib\site-packages\win32com\client\gencache.py", line 180, in GetClassForCLSID
mod = GetModuleForCLSID(clsid)
File "C:\Program Files (x86)\wapt\lib\site-packages\win32com\client\gencache.py", line 241, in GetModuleForCLSID
makepy.GenerateChildFromTypeLibSpec(sub_mod, info)
File "C:\Program Files (x86)\wapt\lib\site-packages\win32com\client\makepy.py", line 319, in GenerateChildFromTypeLibSpec
gen.generate_child(child, dir_path_name)
File "C:\Program Files (x86)\wapt\lib\site-packages\win32com\client\genpy.py", line 1049, in generate_child
self.file = self.open_writer(out_name)
File "C:\Program Files (x86)\wapt\lib\site-packages\win32com\client\genpy.py", line 786, in open_writer
return open(temp_filename, "wt", encoding=encoding)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Windows\\TEMP\\gen_py\\3.8\\B596CC9F-56E5-419E-A622-E01BB457431Ex0x2x0\\ISearchResult.py.5824.temp'After some searching on the forum, it seems to be a matter of clearing the cache. I haven't tried the commands given yet (thread from 2023). Is this still the way to fix this problem? Isn't there a way to prevent it from happening again?
Sincerely,