Bug 1227679 - exception when running on python3: TypeError: decoding str is not supported
Summary: exception when running on python3: TypeError: decoding str is not supported
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-feedparser
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Haïkel Guémar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-03 09:55 UTC by Michael Stahl
Modified: 2015-11-04 11:48 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-04 11:48:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michael Stahl 2015-06-03 09:55:20 UTC
Description of problem:

running a script that uses python-feedparser, it works successfully
with F21 system Python 2 but with system Python 3 exception is raised:
"TypeError: decoding str is not supported"

Version-Release number of selected component (if applicable):

python3-feedparser-5.1.3-7.fc21.noarch

How reproducible: always

Steps to Reproduce: 

> python3
>>> import feedparser
>>> feedparser.parse("http://bugs.libreoffice.org/buglist.cgi?type0-1-0=changedbefore&field0-1-0=changed&query_format=advanced&ctype=rss&field0-0-0=attachments.mimetype&value0-1-0=2015-06-01&value0-0-0=application/rtf&type0-0-0=equals")

Actual results:

  File "/usr/lib/python3.4/site-packages/feedparser.py", line 3966, in parse
    data, result['encoding'], error = convert_to_utf8(http_headers, data)
  File "/usr/lib/python3.4/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

Expected results:

no exception

Additional info:

the upstream changelog for 5.2.0 mentions this, which looks relevant:

 * Issue 384 (fix chardet support in Python 3)

https://github.com/kurtmckee/feedparser/blob/develop/NEWS

so with any luck upgrade to 5.2.0 should fix it.

Comment 1 Fedora End Of Life 2015-11-04 11:36:14 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Michael Stahl 2015-11-04 11:48:41 UTC
python3-feedparser-5.2.0-1.fc22.noarch

can't reproduce, bug apparently fixed in Fedora 22


Note You need to log in before you can comment on or make changes to this bug.