Editor Error in Calibre 6.5

Bug #1990660 reported by Les Barlow
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

When trying to edit an ebook in Calibre 6.5 I repeatedly recieve the following error.

calibre, version 6.5.0
ERROR: Unhandled exception: <b>TypeError</b>:sequence item 38: expected str instance, CSSComment found

calibre 6.5 embedded-python: True
Windows-10-10.0.22000-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22000')
Python 3.10.1
Windows: ('10', '10.0.22000', 'SP0', 'Multiprocessor Free')
Interface language: en_GB
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 49, 0) && DeDRM (7, 2, 1) && Package KFX (from KFX Input) (1, 49, 0) && Count Pages (1, 11, 3) && EpubMerge (2, 15, 0) && KFX metadata reader (from KFX Input) (1, 49, 0) && KFX Input (1, 49, 0)
Traceback (most recent call last):
File "calibre\gui2\tweak_book\boss.py", line 1292, in save_book
File "calibre\ebooks\oeb\polish\container.py", line 85, in clone_container
File "calibre\ebooks\oeb\polish\container.py", line 1224, in clone_data
File "calibre\ebooks\oeb\polish\container.py", line 318, in clone_data
File "calibre\ebooks\oeb\polish\container.py", line 1074, in commit
File "calibre\ebooks\oeb\polish\container.py", line 1018, in commit_item
File "calibre\ebooks\oeb\polish\container.py", line 1004, in serialize_item
File "calibre\ebooks\oeb\base.py", line 428, in serialize
File "css_parser\css\cssstylesheet.py", line 139, in _getCssText
File "css_parser\serialize.py", line 407, in do_CSSStyleSheet
File "css_parser\css\cssmediarule.py", line 66, in _getCssText
File "css_parser\serialize.py", line 600, in do_CSSMediaRule
File "css_parser\css\cssunknownrule.py", line 50, in _getCssText
File "css_parser\serialize.py", line 721, in do_CSSUnknownRule
TypeError: sequence item 38: expected str instance, CSSComment found

From further investigation the error seems to happen after clicking on Tools/Beautify all files.
I have re-downloaded and re-installed but the error still occurs.

Revision history for this message
Les Barlow (moldy1) wrote :
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.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

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