pbryan / sebsync

Synchronize Standard Ebooks catalog with local ebooks
MIT License
2 stars 0 forks source link

Issue parsing updated date from OPDS feed #1

Closed pbryan closed 4 months ago

pbryan commented 4 months ago
Traceback (most recent call last):
  File "/home/kevin/.local/bin/sebsync", line 8, in <module>
    sys.exit(main())
  File "/home/kevin/.local/pipx/venvs/sebsync/lib/python3.10/site-packages/sebsync.py", line 199, in main
    sebsync(auto_envvar_prefix="SEBSYNC", show_default=True)
  File "/home/kevin/.local/pipx/venvs/sebsync/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/kevin/.local/pipx/venvs/sebsync/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/kevin/.local/pipx/venvs/sebsync/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/kevin/.local/pipx/venvs/sebsync/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/kevin/.local/pipx/venvs/sebsync/lib/python3.10/site-packages/sebsync.py", line 174, in sebsync
    remote_ebooks = get_standard_ebooks(opds, email)
  File "/home/kevin/.local/pipx/venvs/sebsync/lib/python3.10/site-packages/sebsync.py", line 64, in get_standard_ebooks
    updated=datetime.fromisoformat(entry.find("atom:updated", ns).text),
ValueError: Invalid isoformat string: '2024-07-22T17:33:40Z'

Possible issue with older (3.10) Python version?

pbryan commented 4 months ago

Confirmed: the Python 3.10 batteries-included ISO parser is not capable of parsing an RFC 3339 string. The trailing "Z" (UTC) character is making it unhappy.

pbryan commented 4 months ago

Fixed in 1.0a3.