Skip to content

DataRegion Error #1

@omkardwd

Description

@omkardwd

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions