View Single Post
Old 09-23-2022, 06:39 AM   #1
moldy
Enthusiast
moldy began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Oct 2015
Device: Kindle
Editor Error in Calibre 6.5

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.
moldy is offline   Reply With Quote