Invalid escape sequences
- Dominant language
- Jupyter Notebook
- Stars
- 455
- Forks
- 48
- Avg merge
- 4m
- Merged PRs (30d)
- 2
Description
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](https://docs.python.org/3/whatsnew/3.12.html#other-language-changes) 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
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in src/parse_log_file.py around line 28, where the date-time pattern is defined, and review how the sample analysis invokes it. Update the pattern so Python 3.12 does not emit the invalid escape sequence warning, then rerun the sample analysis described in the “How to run analysis” section and confirm the warning is gone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100