Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dateutil.parser._parser.ParserError: Unknown string format #65

Open
iphoting opened this issue Jan 23, 2021 · 1 comment
Open

dateutil.parser._parser.ParserError: Unknown string format #65

iphoting opened this issue Jan 23, 2021 · 1 comment

Comments

@iphoting
Copy link

Hi,

It looks like tarsnapper breaks when the job name has more than one -:

$ /usr/local/bin/tarsnapper -c /opt/tarsnap/etc/tarsnapper.conf list

Error snippet:

Ignoring '/xxx/snipe-it-db-20210121-222959': Unknown string format: db-20210121-222959
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/tarsnapper/script.py", line 155, in get_backups
    date = parse_date(match.groupdict()['date'], job.dateformat)
  File "/usr/local/lib/python3.7/dist-packages/tarsnapper/script.py", line 254, in parse_date
    return dateutil.parser.parse(string)
  File "/usr/local/lib/python3.7/dist-packages/dateutil/parser/_parser.py", line 1374, in parse
    return DEFAULTPARSER.parse(timestr, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/dateutil/parser/_parser.py", line 649, in parse
    raise ParserError("Unknown string format: %s", timestr)
dateutil.parser._parser.ParserError: Unknown string format: db-20210121-222959

Config snippet:

snipe-it-db:
    sources:
      - /opt/snipe-it/sql-backup-archives
    target: /xxx/snipe-it-db-$date
@maratsh
Copy link

maratsh commented Aug 1, 2021

I have same issue. Could be that python version compatibility issue ? I'm using python 3.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants