FS#73432 - [calibre] Selecting highlights causes exception in ePub viewer due to float type
Attached to Project:
Community Packages
Opened by Jarrod Farrell (jarrodfarrell) - Thursday, 20 January 2022, 16:15 GMT
Last edited by Antonio Rojas (arojas) - Friday, 21 January 2022, 18:41 GMT
Opened by Jarrod Farrell (jarrodfarrell) - Thursday, 20 January 2022, 16:15 GMT
Last edited by Antonio Rojas (arojas) - Friday, 21 January 2022, 18:41 GMT
|
Details
Coming from:
https://bugs.launchpad.net/calibre/+bug/1958350
calibre, version 5.34.0 ERROR: Unhandled exception: <b>TypeError</b>:setMaximumHeight(self, int): argument 1 has unexpected type 'float' calibre 5.34 embedded-python: False is64bit: True Linux-5.15.12-1-MANJARO-x86_64-with-glibc2.33 Linux ('64bit', 'ELF') ('Linux', '5.15.12-1-MANJARO', '#1 SMP PREEMPT Wed Dec 29 18:08:07 UTC 2021') Python 3.10.1 Interface language: None Traceback (most recent call last): File "/usr/lib/calibre/calibre/gui2/viewer/highlights.py", line 507, in current_highlight_changed nd.show_notes() File "/usr/lib/calibre/calibre/gui2/viewer/highlights.py", line 408, in show_notes self.setMaximumHeight(h) TypeError: setMaximumHeight(self, int): argument 1 has unexpected type 'float' Affected line https://github.com/kovidgoyal/calibre/blob/eb78a761a99ac20a6364f85e12059fec6517d890/src/calibre/gui2/viewer/highlights.py#L406 Fixed by surrounding the expression with `int()` to convert it from a float to int. Double-clicking a highlight will select the entire highlight instead of erroring and selecting a word. FROM ORIGINAL BUG LOCATION: "This is a bug in your distro calibre package (it updated to python 3.10 without waiting checking if the python software it packages is compatible)." - Kovid Goyal (kovid) |
This task depends upon
Closed by Antonio Rojas (arojas)
Friday, 21 January 2022, 18:41 GMT
Reason for closing: Fixed
Additional comments about closing: calibre 5.35.0
Friday, 21 January 2022, 18:41 GMT
Reason for closing: Fixed
Additional comments about closing: calibre 5.35.0
You aren't using Arch Linux
Anyway, this was fixed two weeks ago and the fix was released in 5.35.0 today (on Arch, not Manjaro). The developer obviously knew it but he decided to close the bug as downstream instead of just saying so. So nice of him.