Bug#1025091: toot: Posting toots with media attachment fails

2022-12-01 Thread gregor herrmann
On Thu, 01 Dec 2022 08:48:29 +0100, Ivan Habunek wrote:

> On Tue, 29 Nov 2022, at 19:27, gregor herrmann wrote:
> > As far as I can guess from the debug output, toot expects something
> > in text_url the but reply from the server contains "text_url":null
> The text_url field was deprecated and seems to be removed in Mastodon 4. 
> This bug is fixed in toot 0.30.1. 

Thanks Ivan and highvoltage, nice to see this fixed in unstable.


Cheers,
gregor

-- 
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
   `-   


signature.asc
Description: Digital Signature


Bug#1025091: toot: Posting toots with media attachment fails

2022-11-30 Thread Ivan Habunek
On Tue, 29 Nov 2022, at 19:27, gregor herrmann wrote:
> As far as I can guess from the debug output, toot expects something
> in text_url the but reply from the server contains "text_url":null

The text_url field was deprecated and seems to be removed in Mastodon 4. 
This bug is fixed in toot 0.30.1. 

Regards,
-- Ivan



Bug#1025091: toot: Posting toots with media attachment fails

2022-11-29 Thread gregor herrmann
Package: toot
Version: 0.29.0-1
Severity: normal

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

I don't manage to post a toot with a photo:


% toot post -m ~/tmp/whatever.png -d "Some description" -p "My CW" -l deu 
--debug
Uploading media: /home/gregoa/tmp/whatever.png
DEBUG:toot:>>> POST https://chaos.social/api/v1/media
DEBUG:toot:>>> HEADERS: {('User-Agent', 'toot/0.29.0'), ('Authorization', 
'***CENSORED***')}
DEBUG:toot:>>> DATA:{'description': 'Some description'}
DEBUG:toot:>>> FILES:   {'file': <_io.BufferedReader 
name='/home/gregoa/tmp/whatever.png'>}
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): chaos.social:443
DEBUG:urllib3.connectionpool:https://chaos.social:443 "POST /api/v1/media 
HTTP/1.1" 200 None
DEBUG:toot:<<< 
DEBUG:toot:<<< 
b'{"id":"109428449579345798","type":"image","url":"https://assets.chaos.social/media_attachments/files/109/428/449/579/345/798/original/426857e54bb13ae8.png","preview_url":"https://assets.chaos.social/media_attachments/files/109/428/449/579/345/798/small/426857e54bb13ae8.png","remote_url":null,"preview_remote_url":null,"text_url":null,"meta":{"original":{"width":630,"height":552,"size":"630x552","aspect":1.141304347826087},"small":{"width":512,"height":449,"size":"512x449","aspect":1.1403118040089086}},"description":"Some
 description","blurhash":"U5SY?ax]?cxu~qWBIUjFcsjF?HbIn%ayxukW"}'
Traceback (most recent call last):
  File "/usr/bin/toot", line 33, in 
sys.exit(load_entry_point('toot==0.29.0', 'console_scripts', 'toot')())
  File "/usr/lib/python3/dist-packages/toot/console.py", line 588, in main
run_command(app, user, command_name, args)
  File "/usr/lib/python3/dist-packages/toot/console.py", line 570, in 
run_command
return fn(app, user, parsed_args)
  File "/usr/lib/python3/dist-packages/toot/commands.py", line 103, in post
args.text = "\n".join(m['text_url'] for m in uploaded_media)
TypeError: sequence item 0: expected str instance, NoneType found


As far as I can guess from the debug output, toot expects something
in text_url the but reply from the server contains "text_url":null


chaos.social runs mastodon v4.0.2 (but I seem to remember seeing this
also before the upgrade).


Cheers,
gregor

-BEGIN PGP SIGNATURE-

iQKTBAEBCgB9FiEE0eExbpOnYKgQTYX6uzpoAYZJqgYFAmOGTylfFIAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEQx
RTEzMTZFOTNBNzYwQTgxMDREODVGQUJCM0E2ODAxODY0OUFBMDYACgkQuzpoAYZJ
qgaCfhAAo8mjY7WG5YscVqBi8QJefRwQeJNJuyXhW8ImG5UwaZ7M3sbMFAdmIgz2
KCFKFfLOXj4yKgZflatlJ9gb9Z5+mrQ2ogvZ6Vy69yEyN3APUjO7CDsNIZV1b1VA
A7rdnVGREphN1TTscrzmiO5cWPBUJeYNNuoqAvXz0+dZOSvzEyDgHWVdh9b6oLvQ
T+OW9BH46EHc7yjPYgP07V5WW07k3XXcRZ6+ljmgWU6CLQbS9RFJ1tshEEcf9RMq
t/dbDj0RT5PBDmE3PfS2GCeNVGRXNYWvwhDFGFt2+7etgoyjqmQAsJbq5goqKiGa
T1eaC1418frnr/cHkhuAbdB8Xf8bJCxrpFanlquYqtxYJQjbhVNj+mdaETIIP+xH
LcOJbb+1kPcj97T8LaDf8XpNH0lDUF/m468PkksbfuD1IMZZAMjqeqaH4+IJQ1rB
Loy4J5tHUu6kCFO7chSiNThjRrhE8zdaUNFzubbhup5ZdV56v2o7CdiuLJYF4rxF
LT8+jXsMcYmO3h7UuHHbtk2tfrcvbhBQqg8XlrMYVkXMUYvhaFz2dhYRnlISeHrE
34BrXVi8bd3T3D1A3R0CV2KmGuP6w2x7bHyXADnSDzWmc2BIdeNEs9tjvbx2QPGj
j54dPDT0zrB/E/82Hb6a/uXJ7Bifv6IZ6gY0h8rvfW+L4bUj9qs=
=Net+
-END PGP SIGNATURE-