Fix sync.py (_make_poll) TypeError: Object of type TextWithEntities i…
…s not JSON serializable
Thanks for the PR @GoraPeak.
Did this change from .text to .text.text in the Telethon API recently? Polls were working earlier.
Hello!
A synchronization error occurred while synchronizing the channel's telegrams. I followed the debugging steps for the _make_poll function, for this function code
options = [{“label”: a.text, “count”: 0, “correct”: False} for a in msg.media.poll.answers]
The type of the msg.media.poll.answers object corresponds to the PollAnswer structure (https://tl.telethon.dev/constructors/poll_answer.html), the type of the text field corresponds to the TextWithEntities type (https://tl.telethon.dev/constructors/text_with_entities.html), which has the text:string attribute. I don't know when the API was changed.