You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: RSS converter crashes with UnboundLocalError when channel title is missing #1946
_rss_converter.py:_parse_rss_type() crashes with UnboundLocalError when an RSS feed has no <title> element in the channel (or the title element is empty).
Root Cause
In _rss_converter.py lines 146-157, md_text is only initialized inside the if channel_title: block. If channel_title is None or empty (which happens when the RSS feed has no <title> tag), md_text is never assigned. The subsequent md_text += ... operations then raise UnboundLocalError.
Reproduction
Convert an RSS feed XML file where the <channel> element has no <title> child.
Expected Behavior
The conversion should succeed, producing markdown output without a top-level heading. Missing optional fields should be handled gracefully.
Proposed Fix
Initialize md_text = "" before the if channel_title: block, so the subsequent += operations work correctly regardless of whether the title is present.
This was fixed by #2164, which initializes the output independently of the optional channel title. I’m closing this as resolved. Please reopen with a reproducer if the issue persists.
Activity
fix: initialize md_text before conditional blocks in RSS converter (m…
afourney commentedon Sep 4, 2026
This was fixed by #2164, which initializes the output independently of the optional channel title. I’m closing this as resolved. Please reopen with a reproducer if the issue persists.