8000 Fix sync.py (_make_poll) TypeError: Object of type TextWithEntities i… by GoraPeak · Pull Request #160 · knadh/tg-archive · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix sync.py (_make_poll) TypeError: Object of type TextWithEntities i… #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 29, 2025

Conversation

GoraPeak
Copy link
Contributor
@GoraPeak GoraPeak commented Jun 9, 2025

…s not JSON serializable

@knadh
Copy link
8000 Owner
knadh commented Jun 9, 2025

Thanks for the PR @GoraPeak.

Did this change from .text to .text.text in the Telethon API recently? Polls were working earlier.

@GoraPeak
Copy link
Contributor Author
GoraPeak commented Jun 9, 2025

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.

@knadh knadh merged commit bdee32c into knadh:master Jun 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0