Skip to content

Invalid escape sequences #18

Description

@SoniaZaldana

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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