Bug 1398939

Summary: libxml2 v2.9.3-4 causes TypeError with python3-feedparser
Product: [Fedora] Fedora Reporter: Wolfgang Popp <mail>
Component: libxml2Assignee: Daniel Veillard <veillard>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 25CC: athmanem, c.david86, veillard
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libxml2-2.9.4-2.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-19 09:24:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Wolfgang Popp 2016-11-27 13:28:16 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36
Build Identifier: 

The "feedparser.parse()" function crashes with the following TypeError: a bytes-like object is required, not 'str'. I was able to workaround this issue by manually compiling and installing libxml2 version 2.9.4.

Reproducible: Always

Steps to Reproduce:
1. Open python3 shell
2. import feedparser
3. feedparser.parse("http://fedoraplanet.org/rss20.xml")
Actual Results:  
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.5/site-packages/feedparser.py", line 3957, in parse
    saxparser.parse(source)
  File "/usr/lib64/python3.5/site-packages/drv_libxml2.py", line 190, in parse
    _d(reader.LocalName()))
  File "/usr/lib64/python3.5/site-packages/drv_libxml2.py", line 70, in _d
    return _decoder(s)[0]
  File "/usr/lib64/python3.5/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
TypeError: a bytes-like object is required, not 'str'


Expected Results:  
No TypeError

Comment 1 Fedora Update System 2017-04-11 13:21:00 UTC
libxml2-2.9.4-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-a3a47973eb

Comment 2 Fedora Update System 2017-04-11 19:26:10 UTC
libxml2-2.9.4-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-a3a47973eb

Comment 3 Fedora Update System 2017-04-19 09:24:27 UTC
libxml2-2.9.4-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.