Conversion to PDF fails with "TypeError: '<=' not supported between instances of 'str' and 'float'"

Bug #1969981 reported by Scott S
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Fix Released
Undecided
Unassigned

Bug Description

When converting to PDF or other formats, getting the error below, always on "clean edges" as last line of output before the error.

Using Calibre version calibre-5.40.0 on Windows 10. Not sure I can upload an example due to copyrights.

(Edit) The following CSS will generate this error/conversion failure:

margin:auto;

Conversion error...
 File "calibre\utils\ipc\worker.py", line 215, in main
  File "calibre\gui2\convert\gui_conversion.py", line 38, in gui_convert_override
  File "calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert
  File "calibre\ebooks\conversion\plumber.py", line 1239, in run
  File "calibre\ebooks\oeb\transforms\flatcss.py", line 204, in __call__
  File "calibre\ebooks\oeb\transforms\flatcss.py", line 666, in flatten_spine
  File "calibre\ebooks\oeb\transforms\flatcss.py", line 574, in flatten_node
  File "calibre\ebooks\oeb\transforms\flatcss.py", line 493, in flatten_node
  File "calibre\ebooks\oeb\transforms\flatcss.py", line 343, in clean_edges
TypeError: '<=' not supported between instances of 'str' and 'float'

Scott S (mondaylions123)
description: updated
Revision history for this message
Kovid Goyal (kovid) wrote : Fixed in master

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.