GCGC icon indicating copy to clipboard operation
GCGC copied to clipboard

Invalid escape sequences

Open SoniaZaldana opened this issue 1 year ago • 1 comments

Hi folks,

I'm new to the project and was working my way through the "How to run analysis" section. Just wanted to note that a python failure comes up when trying to run the sample data:

./../src/parse_log_file.py:28: SyntaxWarning: invalid escape sequence '\['
  date_time = "\[(\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d{3}[+-]\d{4})\]", "DateTime", str # [9999-08-26T14:42:00.565-0400]

I'm on Python 3.12.5.

I did a bit of digging and found that in Python 3.12 the error message is changed from a DeprecationWarning to a SyntaxWarning.

Switching to raw strings should be an easy fix for parse_log_file.py but something to note for folks running newer Python versions.

Cheers, Sonia

SoniaZaldana avatar Oct 17 '24 15:10 SoniaZaldana

Sonia, thank you for the report and analysis!

ivankrylov avatar Oct 17 '24 20:10 ivankrylov