wking / rss2email

open-source tool for Windows, Mac OS and UNIX for getting news from RSS feeds in email
http://pypi.python.org/pypi/rss2email/
GNU General Public License v2.0
268 stars 48 forks source link

startswith first arg must be bytes or a tuple of bytes, not str #94

Closed RalphCorderoy closed 3 years ago

RalphCorderoy commented 7 years ago

rss2email-wking 3.9-1 on Arch Linux. Running http://www.godbolt.org/feed gives

error while running time limited function: startswith first arg must be bytes or a tuple of bytes, not str
cause: startswith first arg must be bytes or a tuple of bytes, not str

Here's the current content of the feed. godbolt-feed.rss.txt

dme commented 5 years ago

In the feedparser _FeedParserMixin class pop function, code was added to ensure that pieces is a string "for Python 3". Unfortunately this happens too late, as the chunk of code above that removes a div wrapper already assumes strings. Moving the code that ensures pieces is a string above the div removing loop fixes this for me.

(I will go over to the feedparser project and raise an issue there.)

dme commented 5 years ago

Pull request for feedparser is here: https://github.com/kurtmckee/feedparser/pull/140

Ekleog commented 3 years ago

Hello,

This repository has been deprecated for a few years now, and has been replaced by https://github.com/rss2email/rss2email .

If this issue is still relevant to you, and not fixed with v3.12.2, could you please reopen the issue there?

Cheers, Leo

RalphCorderoy commented 3 years ago

@dme's above fix to feedparser stopped the error. Closing issue.