View Single Post
Old 09-23-2022, 08:47 AM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,983
Karma: 147448039
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by moldy View Post
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.
You need to update DeDRM. 7.2.1 is obsolete and is not Calibre 6 compatible. You need to install DeDRM 10.0.3.

https://github.com/noDRM/DeDRM_tools
JSWolf is offline   Reply With Quote