![]() |
#31 |
just an egg
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,832
Karma: 8006102
Join Date: Mar 2015
Device: Kindle, iOS
|
Greetings!
This wonderful plug-in is failing when I run it in Sigil 0.9.18 :( Here's the error message: Code:
Status: failed Traceback (most recent call last): File "/Applications/Sigil.app/Contents/plugin_launchers/python/launcher.py", line 135, in launch self.exitcode = target_script.run(container) File "/Users/oda/Library/Application Support/sigil-ebook/sigil/plugins/cssRemoveUnusedSelectors/plugin.py", line 600, in run css_to_change[sel_data[0]] = sel_data[4].cssText File "site-packages/css_parser/css/cssstylesheet.py", line 139, in _getCssText File "/Users/oda/Library/Application Support/sigil-ebook/sigil/plugins/cssRemoveUnusedSelectors/customCssutils.py", line 53, in do_CSSStyleSheet text = self._linenumnbers(self.prefs.lineSeparator.join(out)) AttributeError: 'MyCSSSerializer' object has no attribute '_linenumnbers' Error: 'MyCSSSerializer' object has no attribute '_linenumnbers' Last edited by odamizu; 09-04-2019 at 01:51 AM. |
![]() |
![]() |
![]() |
#32 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,731
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
from Code:
text = self._linenumnbers(self.prefs.lineSeparator.join(out))
to: Code:
text = self._linenumbers(self.prefs.lineSeparator.join(out)) |
|
![]() |
![]() |
Advert | |
|
![]() |
#33 |
just an egg
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,832
Karma: 8006102
Join Date: Mar 2015
Device: Kindle, iOS
|
|
![]() |
![]() |
![]() |
#34 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 588278
Join Date: Apr 2016
Device: none
|
That was a systematic typo in cssutils that some overzealous would-be developer corrected in the upgrade to css-parser...
![]() ![]() When I have the time I will add a new version of the plugin that will directly use the new serializer. In the meantime ![]() |
![]() |
![]() |
![]() |
#35 | ||
just an egg
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,832
Karma: 8006102
Join Date: Mar 2015
Device: Kindle, iOS
|
Quote:
![]() ![]() Quote:
![]() ![]() |
||
![]() |
![]() |
Advert | |
|
![]() |
#36 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 588278
Join Date: Apr 2016
Device: none
|
|
![]() |
![]() |
![]() |
#37 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,607
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Just curious: was there some serious jury-rigging you were doing to get cssutils to work (or were you including your own cssutils) or something? just curious why this typo didn't cause trouble before now. We made sure that all calls to import any part of cssutils were hijacked and silently redirected to the equivalent css_parser pieces when we made the change. That was done specifically so any plugins that used cssutils could still work (giving the dev time to change to css_parser at their leisure). Sorry that didn't seem to work for your plugin.
|
![]() |
![]() |
![]() |
#38 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,805
Karma: 6000000
Join Date: Nov 2009
Device: many
|
wrCisco fixed the typo in css-parser when he ported his improvements over for us into css-parser. I had forgotten that typo worked "as is" in cssutils but since it was fixed in css-parser it created this plugin issue which he has now fixed!
|
![]() |
![]() |
![]() |
#39 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 588278
Join Date: Apr 2016
Device: none
|
The plugin includes a sublcass of the cssutils's serializer, and in that subclass I had to copy some parent's methods in full along with the typo in order to add some lines of code in between to circumvent some issues with the old serializer.
Since the typo was in a private attribute, it's probably just me that's been hit by myself... |
![]() |
![]() |
![]() |
#40 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,607
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Ah... I get it now. Thanks! I'd forgotten you were the one who was helping Kevin and Kovid get css-parser up and going.
![]() |
![]() |
![]() |
![]() |
#41 |
just an egg
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,832
Karma: 8006102
Join Date: Mar 2015
Device: Kindle, iOS
|
|
![]() |
![]() |
![]() |
#42 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73
Karma: 7130
Join Date: Apr 2015
Device: PRS-T3
|
Hi wrCisco,
Could you also add a feature that does the opposite, i.e. looks in the html/xhtml/xml files for classes that are used in these files, but do not have a corresponding defintion in the css file? I've downloaded several ebook from gutenberg.org, which did not provide definitions for all classes used in the html/... files. Since I guess that the creator intended to have a special formating of the corresponding text passages, but forgot to add the defintions to the css, it would be good to be informed about the missing defintions to be able to format these passages. Regards, McDummy |
![]() |
![]() |
![]() |
#43 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,382
Karma: 169098492
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
And yes, this is a commercial book I'm cleaning up for my wife.. If you want really bad examples, check for ebooks created by Vellum. |
|
![]() |
![]() |
![]() |
#44 | |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,589
Karma: 14328510
Join Date: Nov 2019
Device: none
|
Quote:
|
|
![]() |
![]() |
![]() |
#45 | ||
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,382
Karma: 169098492
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 523 | 07-15-2025 06:45 PM |
[FileType Plugin] YVES Bible Plugin | ClashTheBunny | Plugins | 27 | 01-16-2023 01:25 AM |
Plugin not customizable: Plugin: HTML Output does not need customization | flyingfoxlee | Conversion | 2 | 02-24-2012 02:24 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |
New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 12:11 PM |