01-06-2019, 05:23 PM | #1 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
cssutils
Did something bad happen to the cssutils module?
I just installed calibre v3.37 and now every plugin I use which manipulates CSS is inaccessible. I tried to revert to my older run-from-source calibre, which I last updated about a week ago. Unfortunately this doesn't work either. This is the error message I got when I tried to start up my run-from-source version Code:
calibre, version 3.36.0 ERROR: Startup error: There was an error during calibre startup. Parts of calibre may not function. Click Show details to learn more. Traceback (most recent call last): File "D:\JS_git_devel\cal\src\calibre\gui2\main.py", line 289, in initialize_db_stage2 File "D:\JS_git_devel\cal\src\calibre\gui2\main.py", line 228, in start_gui File "D:\JS_git_devel\cal\src\calibre\gui2\ui.py", line 157, in __init__ File "D:\JS_git_devel\cal\src\calibre\gui2\ui.py", line 171, in init_iaction File "D:\JS_git_devel\cal\src\calibre\customize\__init__.py", line 612, in load_actual_plugin File "importlib\__init__.py", line 37, in import_module File "D:\JS_git_devel\cal\src\calibre\gui2\actions\catalog.py", line 13, in <module> File "D:\JS_git_devel\cal\src\calibre\gui2\tools.py", line 16, in <module> File "D:\JS_git_devel\cal\src\calibre\gui2\convert\single.py", line 18, in <module> File "D:\JS_git_devel\cal\src\calibre\gui2\convert\look_and_feel.py", line 13, in <module> File "D:\JS_git_devel\cal\src\calibre\gui2\convert\look_and_feel_ui.py", line 290, in <module> File "D:\JS_git_devel\cal\src\calibre\gui2\css_transform_rules.py", line 13, in <module> File "D:\JS_git_devel\cal\src\calibre\ebooks\css_transform_rules.py", line 11, in <module> ImportError: No module named cssutils.css |
01-06-2019, 05:28 PM | #2 |
Grand Sorcerer
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
Perhaps it has to do with this change: Switch from cssutils to css-parser.
|
Advert | |
|
01-06-2019, 05:35 PM | #3 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
I think I'll wait for the dust to settle before setting out on a mammoth plugin editing session. |
|
01-06-2019, 05:40 PM | #4 |
Grand Sorcerer
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
|
01-06-2019, 08:03 PM | #5 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You just need to do a global search and replace for cssutils changing it to css_parser and you will be fine. Apologies, I neglected to mention this change in the changelog.
|
Advert | |
|
01-06-2019, 08:08 PM | #6 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Oh and some background on the change: cssutils is no longer maintained so the developers of Sigil (which also uses it) and I are collaborating to maintain it as a new fork called css_parser.
|
01-06-2019, 08:44 PM | #7 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
Did the old owners just lose interest or is some new CSS utility on the horizon? |
|
01-06-2019, 08:48 PM | #8 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There have been multiple bugs opened against cssutils for years some even with attached patches that have not been merged. The original owners lost interest a while back, there was a new maintainer and he also lost interest a couple of years ago.
|
01-06-2019, 09:02 PM | #9 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
So will css_parser be maintained just for calibre/Sigil purposes or are you planning to offer a service for the rest of the world?
|
01-06-2019, 09:31 PM | #10 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It's open source, anyone who wants to can use it. Like all the various other bits of calibre infrastructure I maintain, such as html5-parser, rapydscript, mechanize, python2, unrardll, dukpy, etc. etc.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
new developer: cssutils error in hello_world plugin | sdm7g | Development | 3 | 04-28-2012 11:22 AM |