WUA ''ValueError: time data '' does not match format '%m/%d/%Y''

Share your tips or issues concerning the WAPT Console or WAPT Agent here
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Answer
tux
Messages: 62
Registration: Sep 05, 2023 - 09:44

March 27, 2024 - 08:58

Good morning

On some Windows 10 and Windows Server machines, I am getting errors with WUA.
Last error status: ValueError: time data '' does not match format '%m/%d/%Y'

Is this problem fixed in the latest version of WAPT?

Logs for the Install Windows Update task:

Code: Select all

Ensure wuauserv Auto Update option is disabled
Scanning with windows updates rules:
{
 "direct_download":false,
 "default_allow":false,
 "include_potentially_superseded_updates":false,
 "filter":"Type='Software' or Type='Driver'",
 "download_scheduling":"12h",
 "install_scheduling":"6h",
 "install_delay":"",
 "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
Updates scan done.
re-enabling wuauserv previous state: 0
time data '' does not match format '%m/%d/%Y'
Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\waptwua\client.py", line 931, in update_local_status_as_dict
    install_date = str(datetime.datetime.strptime(kbw['InstalledOn'], '%d/%m/%Y'))
  File "_strptime.py", line 568, in _strptime_datetime
  File "_strptime.py", line 349, in _strptime
ValueError: time data '' does not match format '%d/%m/%Y'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\waptservice\service.py", line 1934, 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 288, in _run
    self.result = wua.install_updates(self.force, uuids=self.uuids)
  File "C:\Program Files (x86)\wapt\waptwua\client.py", line 1640, in install_updates
    self.scan_updates_status()
  File "C:\Program Files (x86)\wapt\waptwua\client.py", line 1260, in scan_updates_status
    dict_update_status[self.update_local_status_as_dict(u, _update_history,wmi_installed_windows_updates_result=wmi_installed_windows_updates_result)['update_id']] = self.update_local_status_as_dict(u, _update_history,wmi_installed_windows_updates_result=wmi_installed_windows_updates_result)
  File "C:\Program Files (x86)\wapt\waptwua\client.py", line 933, in update_local_status_as_dict
    install_date = str(datetime.datetime.strptime(kbw['InstalledOn'], '%m/%d/%Y'))
  File "_strptime.py", line 568, in _strptime_datetime
  File "_strptime.py", line 349, in _strptime
ValueError: time data '' does not match format '%m/%d/%Y'

ValueError: time data '' does not match format '%m/%d/%Y'
Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\waptwua\client.py", line 931, in update_local_status_as_dict
    install_date = str(datetime.datetime.strptime(kbw['InstalledOn'], '%d/%m/%Y'))
  File "_strptime.py", line 568, in _strptime_datetime
  File "_strptime.py", line 349, in _strptime
ValueError: time data '' does not match format '%d/%m/%Y'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files (x86)\wapt\waptservice\service.py", line 1934, 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 288, in _run
    self.result = wua.install_updates(self.force, uuids=self.uuids)
  File "C:\Program Files (x86)\wapt\waptwua\client.py", line 1640, in install_updates
    self.scan_updates_status()
  File "C:\Program Files (x86)\wapt\waptwua\client.py", line 1260, in scan_updates_status
    dict_update_status[self.update_local_status_as_dict(u, _update_history,wmi_installed_windows_updates_result=wmi_installed_windows_updates_result)['update_id']] = self.update_local_status_as_dict(u, _update_history,wmi_installed_windows_updates_result=wmi_installed_windows_updates_result)
  File "C:\Program Files (x86)\wapt\waptwua\client.py", line 933, in update_local_status_as_dict
    install_date = str(datetime.datetime.strptime(kbw['InstalledOn'], '%m/%d/%Y'))
  File "_strptime.py", line 568, in _strptime_datetime
  File "_strptime.py", line 349, in _strptime
ValueError: time data '' does not match format '%m/%d/%Y'
Wapt Enterprise Edition 2.6.1.17765
WAPTConsole Enterprise on Windows
WAPT Server on Debian 12
User avatar
dcardon
WAPT Expert
Messages: 1930
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

March 28, 2024 - 7:25 PM

Hi Sébastien,

oops, I think there's a bug here. It seems that neither Windows Update nor WMI has any information about the installation date. This can happen if you deleted the C:\Windows\SoftwareDistribution\ folder and there's another bug at the same time, like the one we just encountered.

We'll look into it tomorrow at the office.

Best regards,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
tux
Messages: 62
Registration: Sep 05, 2023 - 09:44

April 12, 2024 - 11:40

Hello,

just so you know, the c:\windows\softwaredistribution\ folder is indeed present on the affected machines.
Have you identified a workaround for this problem?
Wapt Enterprise Edition 2.6.1.17765
WAPTConsole Enterprise on Windows
WAPT Server on Debian 12
Answer