Oct-10-2021, 04:11 PM
ok, I don't fully understand why it won't work on Linux but adding the filter if '[audit]' in data[index]: fixed it
Thank you all!

for index, line in enumerate(data): try: if '[audit]' in data[index]: res = data[index].strip().split('[audit] ')[1] result = literal_eval(res) timestamp = result['timestamp'] user = result['user']['username'] print(timestamp, user) except KeyError: pass