Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-09-2015, 04:33 PM   #31
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
I've attached a new version that runs epubcheck 4.0.1 and is compatible with Python 3.4.x and Python 2.7.x.

The new version does not add any new functionality for checking ePub2 files and requires the Java 1.6 runtime (Java 1.7 recommended).

Last edited by Doitsu; 10-27-2015 at 05:37 AM.
Doitsu is offline   Reply With Quote
Old 11-08-2015, 11:57 AM   #32
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,022
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
Hi, Doitsu! I've downloaded the new version but receive this message:
Code:
Running ePubCheck ... please wait

Traceback (most recent call last):

  File "C:\Program Files\Sigil\plugin_launchers\python\launcher.py", line 301, in <module>

    
sys.exit(main())
  File "C:\Program Files\Sigil\plugin_launchers\python\launcher.py", line 277, in main
    errorlog += unicode_str(data)
  File "C:\Program Files\Sigil\plugin_launchers\python\compatibility_utils.py", line 189, in unicode_str
    return p.decode(enc)
  File "C:\Python27\lib\encodings\utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xfc in position 191: invalid start byte

Running ePubCheck ... please wait
It happens nothing else. No idea what Icould do.
Windows 10, 32 bit engine.
Leonatus is offline   Reply With Quote
Advert
Old 11-08-2015, 12:14 PM   #33
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,506
Karma: 5433350
Join Date: Nov 2009
Device: many
FWIW, errors like this typically happens when latin1 or cp1252 chars are passed to python routines that are expecting utf-8 encodings. In this case, an error is being detected or generated by the plugin and it is the error message itself that is causing the issue as its contents are not utf-8.

You could run epubcheck via the command line and see what gets sent to std error to see what might be going on. To prevent this issue in future versions of the launcher I will tell it to 'replace' on error.
KevinH is offline   Reply With Quote
Old 11-09-2015, 03:28 AM   #34
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,022
Karma: 10963125
Join Date: Mar 2013
Location: Guben, Brandenburg, Germany
Device: Kobo Clara 2E, Tolino Shine 3
Thanks, KevinH! Unfortunately, I don't know how to run epubcheck via command line under Windows 10.
But I'll send the file where this occurs and further information to Doitsu. He will have a look at it.
Leonatus is offline   Reply With Quote
Old 11-09-2015, 07:34 PM   #35
exaltedwombat
Guru
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
Sigil 0.9 64 bit Windows 10
"Use bundled python"

What's going wrong? I got this working once!

Thanks

Status: failed

Traceback (most recent call last):
File "C:\Program Files\Sigil\plugin_launchers\python\launcher.py", line 134, in launch
target_script = __import__(script_module)
File "C:\Users\lp\AppData\Local\sigil-ebook\sigil\plugins\ePubTidyTool\plugin.py", line 27, in <module>
from ManualWordChecker import cManualWordCheck
File "C:\Users\lp\AppData\Local\sigil-ebook\sigil\plugins\ePubTidyTool\ManualWordChecker .py", line 9, in <module>
from bs4 import BeautifulSoup
ImportError: No module named 'bs4'
Error: No module named 'bs4'
exaltedwombat is offline   Reply With Quote
Advert
Old 11-09-2015, 07:57 PM   #36
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Because you haven't installed BeautifulSoup4, I would assume.
eschwartz is offline   Reply With Quote
Old 11-09-2015, 07:59 PM   #37
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Sigil's bundled Python has no bs4 module. It has a modified version of BeautifulSoup called sigil_bs4 that's available to all plugins.

Developers who want plugins which have a bs4 dependency to work with Sigil's bundled python AND an external python installation will probably want to do something like:
Code:
try:
  from sigil_bs4 import BeautifulSoup
except ImportError:
  from bs4 import BeautifulSoup
This will have the advantage of still being able to work if and when Sigil's modified bs4 module ever becomes unnecessary in the future.

Just using:
Code:
from sigil_bs4 import BeautifulSoup
will probably work too, since the sigil_bs4 module is available to any external python installations (via the launcher framework), but has the disadvantage of possibly not working with earlier versions of Sigil, and potentially not working with future versions, if the special sigil_bs4 module ever becomes unnecessary.

Even if you have no plans to support external python interpreters with your plugin, it will still probably be a good idea to incorporate the try/except technique with (sigil_)bs4 for future-proofing. bs4 is currently the only "non-stock" python module that Sigil uses. If the constraints that force us to use it ever go away, we'd love to do away with it and replace it with the stock version. This technique will ensure your plugin's continued functionality in the event that happens.

Quote:
Originally Posted by exaltedwombat View Post
What's going wrong? I got this working once!
If you had it working once, I assume it's because you have a working external installation of Python with bs4 already installed. If that's the case, just uncheck "Use Bundled Python" and setup your external Python interpreter(s) in Manage Plugins.

Last edited by DiapDealer; 11-09-2015 at 08:36 PM.
DiapDealer is offline   Reply With Quote
Old 11-09-2015, 10:24 PM   #38
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: 34,537
Karma: 144552660
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Yet another error message. Windows 10 x64. The error only occurs when I launch Sigil using Calibre's Open With plugin. Otherwise, I get the expected No problems found! message in Sigil's message box.

Code:
Status: failed

Traceback (most recent call last):
  File "C:\Program Files\Sigil\plugin_launchers\python\launcher.py", line 135, in launch
    self.exitcode = target_script.run(container)
  File "C:\Users\David\AppData\Local\sigil-ebook\sigil\plugins\EpubCheck\plugin.py", line 32, in run
    result = jarWrapper(*args)
  File "C:\Users\David\AppData\Local\sigil-ebook\sigil\plugins\EpubCheck\plugin.py", line 9, in jarWrapper
    process = Popen(list(args), stdout=PIPE, stderr=PIPE)
  File "subprocess.py", line 859, in __init__
  File "subprocess.py", line 1112, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified
Error: [WinError 2] The system cannot find the file specified
DNSB is offline   Reply With Quote
Old 11-09-2015, 10:33 PM   #39
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,506
Karma: 5433350
Join Date: Nov 2009
Device: many
FWIW: I do not think opening an app like Sigil with its builtin python 3 in a python 2.7 program like Calibre would be generally a good idea.

KevinH
KevinH is offline   Reply With Quote
Old 11-10-2015, 12:06 AM   #40
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: 34,537
Karma: 144552660
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by KevinH View Post
FWIW: I do not think opening an app like Sigil with its builtin python 3 in a python 2.7 program like Calibre would be generally a good idea.

KevinH
Convenience trumps good idea 99% of the time.
DNSB is offline   Reply With Quote
Old 11-10-2015, 12:18 AM   #41
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
In addition to what KevinH said; there have been issues (for a long time) with the calibre OpenWith plugin and Windows and Sigil. The plugin "clears" the environment before launching Sigil (specifically) on Windows. Which means any environment variables (and possibly command-line args) that Sigil may get launched with are stripped beforehand. Perhaps you'd have better luck using the new(ish), built-in Open With feature of calibre.

Either way, I don't believe this particular error is something that can be "fixed" by the Sigil plugin developer.

Last edited by DiapDealer; 11-10-2015 at 12:24 AM.
DiapDealer is offline   Reply With Quote
Old 11-10-2015, 12:33 AM   #42
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by exaltedwombat View Post
Sigil 0.9 64 bit Windows 10
"Use bundled python"

What's going wrong? I got this working once!

Thanks

Status: failed

Traceback (most recent call last):
File "C:\Program Files\Sigil\plugin_launchers\python\launcher.py", line 134, in launch
target_script = __import__(script_module)
File "C:\Users\lp\AppData\Local\sigil-ebook\sigil\plugins\ePubTidyTool\plugin.py", line 27, in <module>
from ManualWordChecker import cManualWordCheck
File "C:\Users\lp\AppData\Local\sigil-ebook\sigil\plugins\ePubTidyTool\ManualWordChecker.py", line 9, in <module>
from bs4 import BeautifulSoup
ImportError: No module named 'bs4'
Error: No module named 'bs4'
This is an error message for the ePubTidyTool developed by Calibuser. As for the solution, see DiapDealer's post.

Quote:
Originally Posted by DNSB View Post
Yet another error message. Windows 10 x64. The error only occurs when I launch Sigil using Calibre's Open With plugin. Otherwise, I get the expected No problems found! message in Sigil's message box.
Unfortunately, the epubcheck plugin only works if it's run directly from Sigil and not via Calibre.
BTW, if you just want to check your epub, download pagina EPUB-Checker, which comes with a nice GUI.
Doitsu is offline   Reply With Quote
Old 11-10-2015, 05:23 AM   #43
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,908
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by DiapDealer View Post
In addition to what KevinH said; there have been issues (for a long time) with the calibre OpenWith plugin and Windows and Sigil. The plugin "clears" the environment before launching Sigil (specifically) on Windows. Which means any environment variables (and possibly command-line args) that Sigil may get launched with are stripped beforehand. Perhaps you'd have better luck using the new(ish), built-in Open With feature of calibre.
This is the code in the Open With plugin:

Code:
# As of v1.5.3 will no longer use subprocess because it does not work
# for users who have non-ascii library paths
# However we need a special case for Sigil which has issues with C runtime paths
DETACHED_PROCESS = 0x00000008
if external_app_path.lower().endswith('sigil.exe'):
    clean_env = dict(os.environ)
    del clean_env['PATH']
    subprocess.Popen(app_args_list, creationflags=DETACHED_PROCESS, env=clean_env)
That seems to only clear environment variable and the command-line arguments are whatever was put in the configuration.

This change was made in October 2012. That was done because of problems with the Sigil 0.5.9 beta. If the newer versions of Sigil is not likely to hit the same problem, then I can make the change.
davidfor is offline   Reply With Quote
Old 11-10-2015, 06:10 AM   #44
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,582
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
@davidfor: I've just double-checked this issue with the latest 64bit Sigil 0.9.0 version and wasn't able to reproduce the bug described by DNSB.

The problem was most likely caused by an older Sigil version and or problems with external Python interpreters. I.e. there's nothing for you to fix.

@DNSB: Could you please provide the following information:

OS:
Sigil version:
Installed Python version(s):

Also please indicate whether you've installed the 32bit or 64bit versions of Sigil and Python.
Doitsu is offline   Reply With Quote
Old 11-10-2015, 07:26 AM   #45
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Not to counter your claim that it's working for you with v0.9.0, Doitsu, but... doesn't your plugin use the system PATH to locate the java executable? If the calibre OpenWith plugin cleans the PATH environment variable before launching Sigil (thanks @davidfor for the clarification, I couldn't remember the exact details). How will your (or any other Sigil plugin that relies on the system PATH to find an external program) be able to function if PATH is cleaned beforehand?

Regarding whether or not Sigil still suffers from the issue with c runtime paths that it's predecessors had, I have no real idea at this time.

Last edited by DiapDealer; 11-10-2015 at 07:29 AM.
DiapDealer is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Plugin] PunctuationSmarten Sigil plugin DiapDealer Plugins 138 07-11-2023 11:22 AM
[Plugin] KindleImport Sigil plugin DiapDealer Plugins 187 07-04-2022 10:11 AM
Sigil Plugin Index Thasaidon Plugins 0 10-04-2014 07:41 AM
FC and Sigil 0.5.3 ePUBcheck failure Hitch Sigil 32 04-17-2012 02:56 AM
Web-based epubcheck upgraded to epubcheck 1.0.5 kjk ePub 4 02-09-2010 09:53 PM


All times are GMT -4. The time now is 04:23 PM.


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