Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
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
Old 09-23-2022, 06:48 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Open a bug report and attach the book file.
kovidgoyal is offline   Reply With Quote
Advert
Old 09-23-2022, 08:17 AM   #3
moldy
Enthusiast
moldy began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Oct 2015
Device: Kindle
Bug Report

Submitted 23 Sep 22
moldy is offline   Reply With Quote
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,758
Karma: 145864619
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
Old 09-24-2022, 06:13 AM   #5
moldy
Enthusiast
moldy began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Oct 2015
Device: Kindle
Thanks Jon - will do.
moldy is offline   Reply With Quote
Advert
Old 09-24-2022, 06:36 AM   #6
moldy
Enthusiast
moldy began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Oct 2015
Device: Kindle
That didn't work - I'm still getting the error message.
I deleted the book I was working on and reloaded the book into calibre.
I changed a file name - worked ok.
Clicked on 'beautify all files'.
Tried to change a file name - error.
Tried to delete a file - error.
moldy is offline   Reply With Quote
Old 09-24-2022, 06:40 AM   #7
moldy
Enthusiast
moldy began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Oct 2015
Device: Kindle
FYI
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 (10, 0, 3) && 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 94, in ans
File "calibre\gui2\tweak_book\boss.py", line 438, in delete_requested
File "calibre\gui2\tweak_book\boss.py", line 837, in add_savepoint
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
moldy is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error when I insert an image in the Calibre editor Sans Nom Editor 7 08-23-2022 05:28 AM
Metadata-editor error? elibrarian Sigil 2 12-18-2020 03:56 PM
Calibre Editor: Insert Special Character error knorris Editor 21 02-22-2018 09:38 PM
Calibre Hudl 2: calibre, version 3.2.1 ERROR: Error: Error communicating with device elfed Devices 4 07-21-2017 05:33 AM
Error in Editor.. samy2 Editor 2 04-05-2014 02:02 AM


All times are GMT -4. The time now is 09:18 AM.


MobileRead.com is a privately owned, operated and funded community.