HaveF / feedparser

Automatically exported from code.google.com/p/feedparser
Other
0 stars 0 forks source link

Crash on Python 3 #403

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

With Python 3.2, I was getting this:

Traceback (most recent call last):
  File "/home/progval/.local/lib/python3.2/site-packages/supybot/plugins/RSS/plugin.py", line 262, in getFeed
    results = feedparser.parse(url)
  File "/home/progval/.local/lib/python3.2/site-packages/feedparser.py", line 3966, in parse
    data, result['encoding'], error = convert_to_utf8(http_headers, data)
  File "/home/progval/.local/lib/python3.2/site-packages/feedparser.py", line 3768, in convert_to_utf8
    chardet_encoding = str(chardet.detect(data)['encoding'] or '', 'ascii', 'ignore')
TypeError: decoding str is not supported

I'm sending you a patch (against the 2to3ized version of feedparser, you may 
have to edit my patch) to make it work.

Regards,
Valentin

Original issue reported on code.google.com by prog...@gmail.com on 29 May 2013 at 12:59

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thank you for reporting this!

This was fixed in git master to the best of my knowledge. I apologize for not 
releasing a new version to get this out to everyone.

Original comment by kurtmckee on 10 Jul 2014 at 4:53