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

Intermittenly, odmpy libby has time data value error #53

Closed
joshuatly opened this issue Sep 14, 2023 · 2 comments
Closed

Intermittenly, odmpy libby has time data value error #53

joshuatly opened this issue Sep 14, 2023 · 2 comments

Comments

@joshuatly
Copy link

Describe the problem
Intermittenly, odmpy libby has the following error:
It shows up sometimes, but fine when I rerun it.

Traceback (most recent call last):
  File "/home/joshua/.local/bin/odmpy", line 8, in <module>
An unexpected error has occurred
Traceback (most recent call last):
  File "/home/joshua/.local/lib/python3.9/site-packages/odmpy/odm.py", line 1005, in run
    expiry_date = parse_datetime(loan["expireDate"])
  File "/home/joshua/.local/lib/python3.9/site-packages/odmpy/utils.py", line 67, in parse_datetime
    dt = datetime.strptime(value, fmt)
  File "/usr/lib/python3.9/_strptime.py", line 568, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
:    sys.exit(main())
  File "/home/joshua/.local/lib/python3.9/site-packages/odmpy/__main__.py", line 27, in main
    run()
  File "/home/joshua/.local/lib/python3.9/site-packages/odmpy/odm.py", line 1005, in run
    expiry_date = parse_datetime(loan["expireDate"])
  File "/home/joshua/.local/lib/python3.9/site-packages/odmpy/utils.py", line 67, in parse_datetime
    dt = datetime.strptime(value, fmt)
  File "/usr/lib/python3.9/_strptime.py", line 568, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/usr/lib/python3.9/_strptime.py", line 349, in _strptime
    raise ValueError("time data %r does not match format %r" %
ValueError: time data '2023-09-14T07:20:30+00:00' does not match format '%Y-%m-%dT%H:%M:%S.%fZ'

To Reproduce
Please include the full command used, for example odmpy libby

Version/Environment
odmpy 0.8.0 [Python 3.9.2-linux]

@ping
Copy link
Owner

ping commented Sep 14, 2023

This should be fixed if you update from master or with for the next release.

@joshuatly
Copy link
Author

Thanks a lot!

@ping ping closed this as completed Sep 14, 2023
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