ihabunek / toot

toot - Mastodon CLI & TUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

invalid isoformat string on toot timeline

lilmike opened this issue · comments

Hiya,

I'm running toot 0.38.1_2 on void linux, python 3.12, and get the following traceback on running "toot timeline -c1" (it's worth noting I'm using pleroma, but this never broke before... might be a new thing as of python 3.12):

Traceback (most recent call last):
  File "/usr/bin/toot", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.12/site-packages/toot/console.py", line 961, in main
    run_command(app, user, command_name, args)
  File "/usr/lib/python3.12/site-packages/toot/console.py", line 943, in run_command
    return fn(app, user, parsed_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/toot/commands.py", line 60, in timeline
    statuses = [from_dict(Status, item) for item in items]
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/toot/entities.py", line 373, in from_dict
    return cls(**dict(_fields()))
                 ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/toot/entities.py", line 371, in _fields
    yield field.name, _convert(field_type, value)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/toot/entities.py", line 404, in _convert
    return from_dict(field_type, value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/toot/entities.py", line 373, in from_dict
    return cls(**dict(_fields()))
                 ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/toot/entities.py", line 371, in _fields
    yield field.name, _convert(field_type, value)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/toot/entities.py", line 397, in _convert
    return date.fromisoformat(value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Invalid isoformat string: '2023-11-08T08:18:46'

Anyy help?

Thanks,

-Michael.

This should be fixed in 0.38.2