FS#49613 - [calibre] Searching in an ebook raises a TypeError exception

Attached to Project: Community Packages
Opened by Rémi Audebert (audebert) - Wednesday, 08 June 2016, 04:48 GMT
Last edited by Doug Newgard (Scimmia) - Wednesday, 08 June 2016, 14:12 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: Searching in an ebook raises a TypeError exception

* Reported on the forum: https://bbs.archlinux.org/viewtopic.php?id=205137
* The root cause of this issue is already being discussed in https://bugs.archlinux.org/task/43382 This is caused by an out-of-sync html5lib between the Arch package and the code committed in calibre that the PKGBUILD strips.
* As of today (2016-06-07), the changes to html5lib that cause this issue have not been integrated to
https://github.com/html5lib/html5lib-python and I don't know if they will.

Additional info:

* package version(s):
** community/calibre 2.58.0-1
** community/python2-html5lib 0.9999999-2

Steps to reproduce:

* Open the ebook viewer
* Type something in the text box and press Enter
* Exception appears. The full error string is:

calibre, version 2.58.0
ERROR: Unhandled exception: <b>TypeError</b>:__init__() got an unexpected keyword argument 'track_positions'

calibre 2.58 embedded-python: False is64bit: True
Linux-4.4.1-2-ARCH-x86_64-with-glibc2.2.5 Linux ('64bit', '')
('Linux', '4.4.1-2-ARCH', '#1 SMP PREEMPT Wed Feb 3 13:12:33 UTC 2016')
Python 2.7.11
Linux: ('', '', '')
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/viewer/main.py", line 594, in find
backwards=backwards)
File "/usr/lib/calibre/calibre/ebooks/oeb/iterator/book.py", line 112, in search
root = parse(raw)
File "/usr/lib/calibre/calibre/ebooks/oeb/polish/parsing.py", line 671, in parse
return parse_html5(raw, log=log, line_numbers=line_numbers, linenumber_attribute=linenumber_attribute, replace_entities=False, fix_newlines=False)
File "/usr/lib/calibre/calibre/ebooks/oeb/polish/parsing.py", line 611, in parse_html5
parser = HTMLParser(tree=builder, track_positions=line_numbers, namespaceHTMLElements=not discard_namespaces)
TypeError: __init__() got an unexpected keyword argument 'track_positions'
This task depends upon

Closed by  Doug Newgard (Scimmia)
Wednesday, 08 June 2016, 14:12 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#43382 

Loading...