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

time data '2019-11-14T10:46:47.508Z' does not match format '%Y-%m-%dT%H:%M:%S.000Z' #36

Closed
adrian-catana opened this issue Nov 25, 2019 · 2 comments · Fixed by #37 or overleaf/automated-ebs-snapshots-docker#1
Assignees

Comments

@adrian-catana
Copy link

Seams like AWS changed the time format for volumes and automated-ebs-snapshots fails now with the following error:

root@8f5c692e99fe:/monitoring-sync# /usr/local/bin/automated-ebs-snapshots --access-key-id $AWS_ACCESS_KEY_ID --secret-access-key $AWS_SECRET_ACCESS_KEY --region $AWS_DEFAULT_REGION --watch-file /monitoring-sync/configs/ebs-volumes.conf --run
2019-11-25 11:57:12,738 - auto-ebs - INFO - Connecting to AWS EC2 in us-east-1

2019-11-25 11:57:13,302 - auto-ebs - INFO - Updated the rotation interval to daily for vol-0ffce4cbd56715dfe
2019-11-25 11:57:13,864 - auto-ebs - INFO - Updated the rotation interval to daily for vol-05af287a940bd96b1
Traceback (most recent call last):
  File "/usr/local/bin/automated-ebs-snapshots", line 29, in <module>
    automated_ebs_snapshots.main()
  File "/usr/local/lib/python2.7/dist-packages/automated_ebs_snapshots/__init__.py", line 171, in main
    snapshot_manager.run(connection)
  File "/usr/local/lib/python2.7/dist-packages/automated_ebs_snapshots/snapshot_manager.py", line 23, in run
    _ensure_snapshot(connection, volume)
  File "/usr/local/lib/python2.7/dist-packages/automated_ebs_snapshots/snapshot_manager.py", line 76, in _ensure_snapshot
    '%Y-%m-%dT%H:%M:%S.000Z')
  File "/usr/lib/python2.7/_strptime.py", line 325, in _strptime
    (data_string, format))
ValueError: time data '2019-11-14T10:46:47.508Z' does not match format '%Y-%m-%dT%H:%M:%S.000Z'

I temporary fix it by by replacing %Y-%m-%dT%H:%M:%S.000Z with %Y-%m-%dT%H:%M:%S.%fZ in snapshot_manager.py.

@gaizeror
Copy link
Contributor

+1

@sebdah
Copy link
Owner

sebdah commented Feb 27, 2020

@gaizeror thanks for the fix, this has been released now

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