-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Script is failing with below error message:
File "C:\Turn_On_Tamper-main\Sophos_Central_Turn_On_Tamper.py", line 282, in
get_all_computers(sub_estate['id'], f"{'https://api-'}{sub_estate['dataRegion']}{'.central.sophos.com/endpoint/v1'}", sub_estate['showAs'])
File "C:\Turn_On_Tamper-main\Sophos_Central_Turn_On_Tamper.py", line 151, in get_all_computers
computer_dictionary['Last_Seen'] = get_days_since_last_seen(computer_dictionary['lastSeenAt'])
File "C:\Turn_On_Tamper-main\Sophos_Central_Turn_On_Tamper.py", line 195, in get_days_since_last_seen
convert_last_seen_to_a_date = datetime.strptime(report_date, "%Y-%m-%dT%H:%M:%S.%f%z")
File "C:\Program Files\Python39\lib_strptime.py", line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File "C:\Program Files\Python39\lib_strptime.py", line 349, in _strptime
raise ValueError("time data %r does not match format %r" %
ValueError: time data '2024-03-19T22:00:45Z' does not match format '%Y-%m-%dT%H:%M:%S.%f%z'