09-09-2015, 05:33 PM | #31 |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
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 06:37 AM. |
11-08-2015, 12:57 PM | #32 |
Wizard
Posts: 1,035
Karma: 11227259
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 Windows 10, 32 bit engine. |
Advert | |
|
11-08-2015, 01:14 PM | #33 |
Sigil Developer
Posts: 8,160
Karma: 5450818
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. |
11-09-2015, 04:28 AM | #34 |
Wizard
Posts: 1,035
Karma: 11227259
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. |
11-09-2015, 08:34 PM | #35 |
Guru
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' |
Advert | |
|
11-09-2015, 08:57 PM | #36 |
Ex-Helpdesk Junkie
Posts: 19,421
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.
|
11-09-2015, 08:59 PM | #37 |
Grand Sorcerer
Posts: 28,042
Karma: 199464182
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 Just using: Code:
from sigil_bs4 import BeautifulSoup 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. 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 09:36 PM. |
11-09-2015, 11:24 PM | #38 |
Bibliophagist
Posts: 40,588
Karma: 157444382
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, 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 |
11-09-2015, 11:33 PM | #39 |
Sigil Developer
Posts: 8,160
Karma: 5450818
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 |
11-10-2015, 01:06 AM | #40 |
Bibliophagist
Posts: 40,588
Karma: 157444382
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
|
11-10-2015, 01:18 AM | #41 |
Grand Sorcerer
Posts: 28,042
Karma: 199464182
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 01:24 AM. |
11-10-2015, 01:33 AM | #42 | ||
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Quote:
BTW, if you just want to check your epub, download pagina EPUB-Checker, which comes with a nice GUI. |
||
11-10-2015, 06:23 AM | #43 | |
Grand Sorcerer
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
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) 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. |
|
11-10-2015, 07:10 AM | #44 |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
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. |
11-10-2015, 08:26 AM | #45 |
Grand Sorcerer
Posts: 28,042
Karma: 199464182
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 08:29 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Plugin] PunctuationSmarten Sigil plugin | DiapDealer | Plugins | 138 | 07-11-2023 12:22 PM |
[Plugin] KindleImport Sigil plugin | DiapDealer | Plugins | 187 | 07-04-2022 11:11 AM |
Sigil Plugin Index | Thasaidon | Plugins | 0 | 10-04-2014 08:41 AM |
FC and Sigil 0.5.3 ePUBcheck failure | Hitch | Sigil | 32 | 04-17-2012 03:56 AM |
Web-based epubcheck upgraded to epubcheck 1.0.5 | kjk | ePub | 4 | 02-09-2010 10:53 PM |