#1040640 toot: crash with stack dump when posting a JPEG

#1040640#5
Date:
2023-07-08 09:36:02 UTC
From:
To:
I tried to post a JPG image and it crashed with a stack dump:

===8<------------------------------
$ torsocks toot post -u bob@example.com -m ./some_pic.jpg -e emacs
Uploading media: ./some_pic.jpg
Traceback (most recent call last):
  File "/usr/bin/toot", line 11, in <module>
    load_entry_point('toot==0.27.0', 'console_scripts', 'toot')()
  File "/usr/lib/python3/dist-packages/toot/console.py", line 550, in main
    run_command(app, user, command_name, args)
  File "/usr/lib/python3/dist-packages/toot/console.py", line 532, in run_command
    return fn(app, user, parsed_args)
  File "/usr/lib/python3/dist-packages/toot/commands.py", line 104, in post
    args.text = "\n".join(m['text_url'] for m in media)
TypeError: sequence item 0: expected str instance, NoneType found
===8<------------------------------

Notice that it was over a Tor circuit though I don’t suppose that’s
likely a factor.

===8<------------------------------
$ identify ./some_pic.jpg
./some_pic.jpg JPEG 1024x763 1024x763+0+0 8-bit sRGB 26324B 0.000u 0:00.000
===8<------------------------------