pleroma-bot
pleroma-bot copied to clipboard
HTTP 422 error for certain quote tweets
The tweet https://nitter.net/EESC_PRESS/status/1650455054833287170#m produces an error 422 with the latest stable version and also with the latest rc version:
Gathering tweets... 38
ℹ 2023-05-08 23:48:33,775 - pleroma_bot - INFO - tweets gathered: 38
Processing tweets... : 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 38/38 [00:15<00:00, 2.40it/s]
ℹ 2023-05-08 23:48:49,741 - pleroma_bot - INFO - tweets to post: 38
Posting tweets... : 0%| | 0/38 [00:00<?, ?it/s]
✖ 2023-05-08 23:48:51,780 - pleroma_bot - ERROR - Exception occurred for user, skipping... (cli.py:721)
Traceback (most recent call last):
File "<redacted>/mastodon/venv/lib64/python3.10/site-packages/pleroma_bot/cli.py", line 688, in main
post_id = user.post(
File "<redacted>/mastodon/venv/lib64/python3.10/site-packages/pleroma_bot/_utils.py", line 796, in post
post_id = self.post_pleroma(tweet, poll, sensitive, media, cw=cw)
File "<redacted>/mastodon/venv/lib64/python3.10/site-packages/pleroma_bot/_pleroma.py", line 398, in post_pleroma
response.raise_for_status()
File "<redacted>/mastodon/venv/lib64/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 422 Client Error: Unprocessable Entity for url: https://respublicae.eu/api/v1/statuses

Also started getting this too, maybe twitter made a change?
logs: https://gist.github.com/dawnerd/74c234ee3b1b386bdfc45322485f24c6
Also happens for quote tweets which quote longer tweets from Twitter Blue subscribers, like https://nitter.lacontrevoie.fr/SophieintVeld/status/1661855362100654082#m (over 900 characters).