René's URL Explorer Experiment


Title: get_forum_topics crashes on ForumTopicDeleted objects · Issue #71 · hydrogram/hydrogram · GitHub

Open Graph Title: get_forum_topics crashes on ForumTopicDeleted objects · Issue #71 · hydrogram/hydrogram

X Title: get_forum_topics crashes on ForumTopicDeleted objects · Issue #71 · hydrogram/hydrogram

Description: Checklist I am sure the error is coming from Hydrogram's code and not elsewhere I have searched in the issue tracker for similar bug reports, including closed ones I ran pip3 install -U https://github.com/hydrogram/hydrogram/archive/dev....

Open Graph Description: Checklist I am sure the error is coming from Hydrogram's code and not elsewhere I have searched in the issue tracker for similar bug reports, including closed ones I ran pip3 install -U https://git...

X Description: Checklist I am sure the error is coming from Hydrogram's code and not elsewhere I have searched in the issue tracker for similar bug reports, including closed ones I ran pip3 install -U https:/...

Opengraph URL: https://github.com/hydrogram/hydrogram/issues/71

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"get_forum_topics crashes on ForumTopicDeleted objects","articleBody":"### Checklist\n\n- [x] I am sure the error is coming from Hydrogram's code and not elsewhere\n- [x] I have searched in the issue tracker for similar bug reports, including closed ones\n- [x] I ran `pip3 install -U https://github.com/hydrogram/hydrogram/archive/dev.zip` and reproduced the issue using the latest development version\n\n### Description\n\nOperating system\nWindows 10\nDebian GNU/Linux 12 (bookworm)\n\nPython version\n3.13.5\n\nhydrogram version\n0.2.0\n\nWhen calling get_forum_topics on a forum chat that contains deleted topics, Hydrogram crashes with an AttributeError. It tries to parse ForumTopicDeleted objects as if they were ForumTopic, but those don’t have the same attributes.\n\nwhat happens if you add logging to the topic parsing in the get_forum_topics function:\n\n```python\nfor _topic in r.topics:\n    try:\n        yield types.ForumTopic._parse(_topic)\n    except Exception as e:\n        print(f\"error_parse: {_topic.__class__}\")\n```\n\nlogs:\nerror_parse: \u003cclass 'hydrogram.raw.types.forum_topic_deleted.ForumTopicDeleted'\u003e\n\n### Steps to reproduce\n\n1. Create client as user\n2. Invoke get_forum_topics on a forum chat that contains deleted topics\n\n### Code example\n\n```python\nimport asyncio\nfrom hydrogram import Client\nfrom hydrogram.types import ForumTopic\n\nAPI_ID = \nAPI_HASH = \nCHAT_ID = -1233 # forum chat with deleted topics\n\nasync def main():\n    async with Client(\"my_session\", api_id=API_ID, api_hash=API_HASH) as app:\n        async for topic in app.get_forum_topics(CHAT_ID):\n            pass\n\nasyncio.run(main())\n```\n\n### Logs\n\n```shell\nWindows:\n\nF:\\projects\\big_projects\\test_hydro\u003ef:/projects/big_projects/test_hydro/.venv/Scripts/python.exe f:/projects/big_projects/test_hydro/main.py\nTraceback (most recent call last):\n  File \"f:\\projects\\big_projects\\test_hydro\\main.py\", line 49, in \u003cmodule\u003e    asyncio.run(main())\n    ~~~~~~~~~~~^^^^^^^^\n  File \"C:\\Program Files\\Python313\\Lib\\asyncio\\runners.py\", line 195, in run      \n    return runner.run(main)\n           ~~~~~~~~~~^^^^^^\n  File \"C:\\Program Files\\Python313\\Lib\\asyncio\\runners.py\", line 118, in run      \n    return self._loop.run_until_complete(task)\n           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^\n  File \"C:\\Program Files\\Python313\\Lib\\asyncio\\base_events.py\", line 725, in run_until_complete\n    return future.result()\n           ~~~~~~~~~~~~~^^\n  File \"f:\\projects\\big_projects\\test_hydro\\main.py\", line 37, in main    \n    async for topic in topics:\n        pass\n  File \"f:\\projects\\big_projects\\test_hydro\\.venv\\Lib\\site-packages\\hydrogram\\methods\\chats\\get_forum_topics.py\", line 71, in get_forum_topics\n    yield types.ForumTopic._parse(_topic)\n          ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^\n  File \"f:\\projects\\big_projects\\test_hydro\\.venv\\Lib\\site-packages\\hydrogram\\types\\user_and_chats\\forum_topic.py\", line 127, in _parse\n    from_id = forum_topic.from_id\n              ^^^^^^^^^^^^^^^^^^^\nAttributeError: 'ForumTopicDeleted' object has no attribute 'from_id'\n\nLinux:\nTraceback (most recent call last):\n  File \"/app/main.py\", line 51, in \u003cmodule\u003e\n    asyncio.run(main())\n    ~~~~~~~~~~~^^^^^^^^\n  File \"/usr/local/lib/python3.13/asyncio/runners.py\", line 195, in run\n    return runner.run(main)\n           ~~~~~~~~~~^^^^^^\n  File \"/usr/local/lib/python3.13/asyncio/runners.py\", line 118, in run\n    return self._loop.run_until_complete(task)\n           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^\n  File \"/usr/local/lib/python3.13/asyncio/base_events.py\", line 725, in run_until_complete\n    return future.result()\n           ~~~~~~~~~~~~~^^\n  File \"/app/main.py\", line 39, in main\n    async for topic in topics:\n        pass\n  File \"/usr/local/lib/python3.13/site-packages/hydrogram/methods/chats/get_forum_topics.py\", line 71, in get_forum_topics\n    yield types.ForumTopic._parse(_topic)\n          ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^\n  File \"/usr/local/lib/python3.13/site-packages/hydrogram/types/user_and_chats/forum_topic.py\", line 127, in _parse\n    from_id = forum_topic.from_id\n              ^^^^^^^^^^^^^^^^^^^\nAttributeError: 'ForumTopicDeleted' object has no attribute 'from_id'\n```","author":{"url":"https://github.com/Barabashka656","@type":"Person","name":"Barabashka656"},"datePublished":"2025-09-13T21:55:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/71/hydrogram/issues/71"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:a80ca7ec-3f8a-94b2-3a09-df43ca15b1e7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEC8A:59C53:AF0D55:EADEB8:69731D29
html-safe-noncef77d0e44c9a0bef587bd163e8ffd8a48ab6f1eff2ba573a5f34f12aa490687e3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzhBOjU5QzUzOkFGMEQ1NTpFQURFQjg6Njk3MzFEMjkiLCJ2aXNpdG9yX2lkIjoiMjY2MTEyMDQ0MjI2MDIwMDc0NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac2d7fa2cb917be0be594a4428f4cd338fdb206598aa4598473716e5c28fbfc4d0
hovercard-subject-tagissue:3414192926
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/hydrogram/hydrogram/71/issue_layout
twitter:imagehttps://opengraph.githubassets.com/39400b0eb4133b0a9a1dcd1a62f6e17ff5ac4d4819a5c0bbddac2c62bb6f293b/hydrogram/hydrogram/issues/71
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/39400b0eb4133b0a9a1dcd1a62f6e17ff5ac4d4819a5c0bbddac2c62bb6f293b/hydrogram/hydrogram/issues/71
og:image:altChecklist I am sure the error is coming from Hydrogram's code and not elsewhere I have searched in the issue tracker for similar bug reports, including closed ones I ran pip3 install -U https://git...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameBarabashka656
hostnamegithub.com
expected-hostnamegithub.com
None44ab3188c1dcfe3be0f9c3feca2e04e14fb79f120939ce2395e4f15ab96ec1d4
turbo-cache-controlno-preview
go-importgithub.com/hydrogram/hydrogram git https://github.com/hydrogram/hydrogram.git
octolytics-dimension-user_id153278131
octolytics-dimension-user_loginhydrogram
octolytics-dimension-repository_id711555265
octolytics-dimension-repository_nwohydrogram/hydrogram
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id711555265
octolytics-dimension-repository_network_root_nwohydrogram/hydrogram
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea5e2b48bd1260476599758f5d253b5d24092ab84
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/hydrogram/hydrogram/issues/71#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fhydrogram%2Fhydrogram%2Fissues%2F71
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fhydrogram%2Fhydrogram%2Fissues%2F71
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=hydrogram%2Fhydrogram
Reloadhttps://github.com/hydrogram/hydrogram/issues/71
Reloadhttps://github.com/hydrogram/hydrogram/issues/71
Reloadhttps://github.com/hydrogram/hydrogram/issues/71
hydrogram https://github.com/hydrogram
hydrogramhttps://github.com/hydrogram/hydrogram
Please reload this pagehttps://github.com/hydrogram/hydrogram/issues/71
Notifications https://github.com/login?return_to=%2Fhydrogram%2Fhydrogram
Fork 46 https://github.com/login?return_to=%2Fhydrogram%2Fhydrogram
Star 203 https://github.com/login?return_to=%2Fhydrogram%2Fhydrogram
Code https://github.com/hydrogram/hydrogram
Issues 14 https://github.com/hydrogram/hydrogram/issues
Pull requests 2 https://github.com/hydrogram/hydrogram/pulls
Discussions https://github.com/hydrogram/hydrogram/discussions
Actions https://github.com/hydrogram/hydrogram/actions
Projects 0 https://github.com/hydrogram/hydrogram/projects
Security 0 https://github.com/hydrogram/hydrogram/security
Insights https://github.com/hydrogram/hydrogram/pulse
Code https://github.com/hydrogram/hydrogram
Issues https://github.com/hydrogram/hydrogram/issues
Pull requests https://github.com/hydrogram/hydrogram/pulls
Discussions https://github.com/hydrogram/hydrogram/discussions
Actions https://github.com/hydrogram/hydrogram/actions
Projects https://github.com/hydrogram/hydrogram/projects
Security https://github.com/hydrogram/hydrogram/security
Insights https://github.com/hydrogram/hydrogram/pulse
New issuehttps://github.com/login?return_to=https://github.com/hydrogram/hydrogram/issues/71
New issuehttps://github.com/login?return_to=https://github.com/hydrogram/hydrogram/issues/71
get_forum_topics crashes on ForumTopicDeleted objectshttps://github.com/hydrogram/hydrogram/issues/71#top
https://github.com/Barabashka656
https://github.com/Barabashka656
Barabashka656https://github.com/Barabashka656
on Sep 13, 2025https://github.com/hydrogram/hydrogram/issues/71#issue-3414192926
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.