Public bug reported:

When using Hamster at the CLI, you see many Python warnings, as follows:
```
$ hamster --help
/usr/lib/python3/dist-packages/hamster/lib/datetime.py:471: SyntaxWarning: 
invalid escape sequence '\s'
  position="exact", separator="\s+", default_day=None, ref="now"):
/usr/lib/python3/dist-packages/hamster/lib/datetime.py:472: SyntaxWarning: 
invalid escape sequence '\s'
  """Parse a start-end range from text.
/usr/lib/python3/dist-packages/hamster/widgets/activityentry.py:381: 
SyntaxWarning: invalid escape sequence '\s'
  fragments = [f for f in re.split("[\s|#]", text)]
/usr/lib/python3/dist-packages/hamster/widgets/timeinput.py:141: SyntaxWarning: 
invalid escape sequence '\D'
  numbers = re.split("\D", str_time)
usage: hamster [-h] [--log {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [action] ...

Time tracking utility
...
```

This is a simple fix, upstream, 2025-03-14:
https://github.com/projecthamster/hamster/issues/769.  Sadly, the PR is
still open and unmerged.

Meanwhile, as a workaround, you can `export
PYTHONWARNINGS="ignore::SyntaxWarning"` when using Hamster, but be aware
that could mask other issues in other tools.

** Affects: hamster-time-tracker (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2142617

Title:
  CLI use shows man "SyntaxWarning: invalid escape sequence" warning

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hamster-time-tracker/+bug/2142617/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to