Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 02-11-2023, 10:07 PM   #106
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,659
Karma: 5433388
Join Date: Nov 2009
Device: many
And I just noticed you had a similar error with this plugin earlier and DiapDealer gave you the solution then:

see https://www.mobileread.com/forums/sh...3&postcount=81
and the next post is your reply.

Same issue I think. Perhaps look for the latest version of that C runtime.
KevinH is online now   Reply With Quote
Old 02-12-2023, 12:15 AM   #107
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,513
Karma: 145557716
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I ran into an error trying to use CustomCleanerPlus on an epub 2.0 that has an .svg image file in the images directory:

Spoiler:
Code:
Status: failed

Python version:  3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit (AMD64)] 

Running CustomCleanerPlus...

 -- Copy to work dir...cover.xhtml
 -- Copy to work dir...part0000.html
 -- Copy to work dir...part0001.html
 -- Copy to work dir...part0002.html
 -- Copy to work dir...part0003.html
 -- Copy to work dir...part0004.html
 -- Copy to work dir...part0005.html
 -- Copy to work dir...part0006.html
 -- Copy to work dir...part0007.html
 -- Copy to work dir...part0008.html
 -- Copy to work dir...part0009.html
 -- Copy to work dir...part0010.html
 -- Copy to work dir...part0011.html
 -- Copy to work dir...part0012.html
 -- Copy to work dir...part0013.html
 -- Copy to work dir...part0014.html
 -- Copy to work dir...part0015.html
 -- Copy to work dir...part0016.html
 -- Copy to work dir...part0017.html
 -- Copy to work dir...part0018.html
 -- Copy to work dir...part0019.html
 -- Copy to work dir...part0020.html
 
 -- Copy images to work dir...C:\Users\David\AppData\Local\Temp\tmpkt1j49b8\cover.jpeg
 -- Copy images to work dir...C:\Users\David\AppData\Local\Temp\tmpkt1j49b8\svgimg0003.svg
Traceback (most recent call last):
  File "C:\Program Files\Sigil\plugin_launchers\python\launcher.py", line 142, in launch
    self.exitcode = target_script.run(container)
  File "C:\Users\David\AppData\Local\sigil-ebook\sigil\plugins\CustomCleanerPlus\plugin.py", line 141, in run
    i_ids, i_fnames = copyImageFiles2Dir(bk, WDIR)          # copy epub images
  File "C:\Users\David\AppData\Local\sigil-ebook\sigil\plugins\CustomCleanerPlus\cutils2.py", line 163, in copyImageFiles2Dir
    outfp.write(data)
TypeError: a bytes-like object is required, not 'str'
Error: a bytes-like object is required, not 'str'


Deleting the svg image file allowed CustomCleanerPlus to run. However despite setting the Remove all hyphen class properties from the CSS, the webkit-hyphenate-limit-whatever lines survived.
DNSB is offline   Reply With Quote
Advert
Old 02-12-2023, 12:20 AM   #108
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
@KevinH...Much thanks for that. I knew about the earlier occurrence of this same fault but I completely missed the solution by DiapDealer!
slowsmile is offline   Reply With Quote
Old 02-12-2023, 01:14 AM   #109
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
@DNSB...I think that you are probably using that svg image as a compound image saved in Sigil's Images dir. That's also probably why it needs to be read as bytes whereas jpg images are read in binary. I'll look into that problem now.

Regarding the failure of the Remove all hyphen class properties from the CSS option to remove all your hyphen properties -- could you please give me a list of all the hyphen class property names that you wish to remove so I can add them for removal in the plugin code? TIA.

Last edited by slowsmile; 02-12-2023 at 04:16 AM.
slowsmile is offline   Reply With Quote
Old 02-12-2023, 07:19 AM   #110
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,023
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
@KevinH: Thanks for your investigative suggestions! My former problem had occurred on my old 32bit computer, but this time it's on my new 64bit. However, I installed the latest version of Visual C++, but the error message is still the same.
And: The python version is (and has always been) 32bit. Should I replace that by a 64bit version?

Last edited by Leonatus; 02-12-2023 at 07:22 AM.
Leonatus is offline   Reply With Quote
Advert
Old 02-12-2023, 09:47 AM   #111
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,659
Karma: 5433388
Join Date: Nov 2009
Device: many
The versions of Windows, Sigil, and Python (64 vs 32 bits) should always match when trying to make calls across dlls. Other setups are just more error prone trying to link the correct dll.

And did you try adding the exact version that DiapDealer recommended? The problem is that it is an old runtime library that newer computers do not have installed by default anymore.

Last edited by KevinH; 02-12-2023 at 10:11 AM.
KevinH is online now   Reply With Quote
Old 02-12-2023, 10:26 AM   #112
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,023
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
I downloaded and installed the latest 64bit version, following DiapDealer's hints.
Leonatus is offline   Reply With Quote
Old 02-12-2023, 04:37 PM   #113
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
@Leonatus...In order to fix your problem using the Remove all hyphen class properties from the CSS option from my plugin, could you please send me a list of the hyphen class property names that were not removed when you ran my plugin? I can't fix that problem without that information.
slowsmile is offline   Reply With Quote
Old 02-12-2023, 05:48 PM   #114
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,513
Karma: 145557716
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by slowsmile View Post
@DNSB...I think that you are probably using that svg image as a compound image saved in Sigil's Images dir. That's also probably why it needs to be read as bytes whereas jpg images are read in binary. I'll look into that problem now.
Thanks for that.

Quote:
Originally Posted by slowsmile View Post
Regarding the failure of the Remove all hyphen class properties from the CSS option to remove all your hyphen properties -- could you please give me a list of all the hyphen class property names that you wish to remove so I can add them for removal in the plugin code? TIA.
Looking at 6 books, the only hypenate properties that survived were:

-webkit-hyphenate-limit-after: 4;
-webkit-hyphenate-limit-before: 4;
-webkit-hyphenate-limit-lines: 2;
-webkit-hyphenate-character:"\2010";
DNSB is offline   Reply With Quote
Old 02-12-2023, 08:46 PM   #115
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Update(v0.5.1):
  • Fixed a copy SVG image file problem(thanks to @DNSB).
  • Fixed a remove hyphen class properties problem(thanks to @DNSB).
Also added a warning in the plugin Release Notes to ensure that plugin users have the Microsoft Visual C++ Service Pack 1 already installed on their computer system before they run this plugin. Doing that will help to avoid any tidy.dll access errors in the future. At some point, I will also be looking at removing Tidy altogether from this plugin.

Last edited by slowsmile; 02-12-2023 at 08:51 PM.
slowsmile is offline   Reply With Quote
Old 02-13-2023, 12:19 AM   #116
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,513
Karma: 145557716
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Tested v0.5.1 on several epubs and the only issue I ran into was after using calibre's ModifyePub plugin to add a cover image. This adds a line in the cover xhtml file reading:

Code:
<meta content="true" name="calibre:cover"/>
When Remove all iss and associated links is checked, CustomCleanerPlus removes the 'name="calibre:cover"' which caused epubcheck to flag that line as an error.

Last edited by DNSB; 02-13-2023 at 12:22 AM.
DNSB is offline   Reply With Quote
Old 02-13-2023, 05:53 AM   #117
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,023
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
@slowsmile: I don't know if it still matters, but in the epubs I tested there were no hyphen classes in the css at all that would have been an object for removal..
Leonatus is offline   Reply With Quote
Old 02-13-2023, 05:56 AM   #118
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,023
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
And I downloaded V. 0.5.1, but the issue remains.
Leonatus is offline   Reply With Quote
Old 02-13-2023, 08:10 AM   #119
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,659
Karma: 5433388
Join Date: Nov 2009
Device: many
Are you using 64 bit version of python, 64 bit version of windows, and 64 bit version of tidy?

Are you sure you have all the runtime files and dlls that tidy needs on your new computer?
KevinH is online now   Reply With Quote
Old 02-13-2023, 09:40 AM   #120
Leonatus
Wizard
Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.Leonatus ought to be getting tired of karma fortunes by now.
 
Leonatus's Avatar
 
Posts: 1,023
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
Well, as I said in #110, the python version is 32bit; that has worked without issues generally, although the OS being 64bit. And how to check the 64 or 32bit version of tidy, I ignore, and do not know if I have all the runtime files and dlls needed by tidy; I can only say that I installed the latest 64bit version of Visual C++.
Leonatus is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FileType Plugin] YVES Bible Plugin ClashTheBunny Plugins 27 01-16-2023 01:25 AM
Problem with my ScrambleEbook plugin and the Plugin Updater tool jackie_w Development 14 01-19-2017 10:49 PM
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


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


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