11-10-2015, 08:39 AM | #46 | |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
(The actual epubcheck.jar file is in the same folder as plugin.py and is located via Sigil Plugin Launcher functions.) Whatever the Calibre Open With code does, it doesn't seem to affect the execution of the epubcheck plugin, at least on 64bit Windows 10 machines. |
|
11-10-2015, 12:31 PM | #47 | |
Bibliophagist
Posts: 40,545
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Calibre: 2.4.3 x64, multiple plugins Sigil: 0.9.0 x64 Installed Python: 2.7 32 bit and 3.4.3 64 bit The 32 bit version is needed when I use a 3D printer. To do some testing, I booted up an Insider Preview Windows 10 VM. OS: Windows 10 x64 build 10576 running under VMWare Workstation Calibre: 2.4.3 x64 with Open With and Kobo Utilities plugins Sigil: 0.9.0 x64 Installed Python: None Result: Flightcrew works either way, epubcheck works from Sigil when launched from command line but does not work when using the Open With plugin to launch. 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 |
|
Advert | |
|
11-10-2015, 01:15 PM | #48 | |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Thanks for the detailed information. I believe you're getting this error message because the plugin can't find the Java executable.
Did you follow the instructions at the bottom of the very first post about adding a path to the Java executable to the Windows PATH environment variable and do you see the version number, if you enter java -version in a command prompt window? If not, this might be the cause of the problem, because the plugin assumes that the java executable can be found via PATH (or other environment variables). (I've added the path to the PATH environment variable and have no problems running the epubcheck plugin via Calibre.) Quote:
Maybe a Calibre plugin developer could develop a Calibre epubcheck plugin for you? |
|
11-10-2015, 09:38 PM | #49 | |
Bibliophagist
Posts: 40,545
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Code:
Original: Path=C:\ProgramData\Oracle\Java\javapath; Modified: Path=C:\Program Files\Java\jre1.8.0_65\bin;C:\ProgramData\Oracle\Java\javapath; Last edited by DNSB; 11-10-2015 at 09:42 PM. |
|
11-10-2015, 10:24 PM | #50 |
Bibliophagist
Posts: 40,545
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Further on...
I edited the plugin.py file to add the java path to the 'java' item in line 29 and the plugin works when spawning Sigil using Calibre's Open With plugin. So it would appear that the Open With plugin is not passing the path properly. Code:
args = ['C:\\Program Files\\Java\\jre1.8.0_65\\bin\\java.exe', '-jar', epc_path, temp_dir, '-mode', 'exp'] |
Advert | |
|
11-11-2015, 11:54 AM | #51 |
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)
|
Find the basename of java.exe : https://stackoverflow.com/questions/...s-command-line
Tell Open With to insert the value of that^^ into clean_env['PATH'] |
11-11-2015, 01:07 PM | #52 | |
Bibliophagist
Posts: 40,545
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Last edited by DNSB; 11-11-2015 at 01:14 PM. |
|
11-11-2015, 01:13 PM | #53 |
Bibliophagist
Posts: 40,545
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Disabling the path removal before launching Sigil from the Open With plugin corrects the issue. So far in opening, editing and validating 10 epubs, I haven't had an issue with Sigil so looks as if that code is not needed for Sigil 0.9.0.
One note is that I am—probably—one of the few people who drag Calibre's Book Detail pane into non-existence so right clicking on the format in that pane to launch Sigil is not an option without adding what I consider to be a waste of precious screen space back into view. As usual, YMMV. |
11-11-2015, 01:14 PM | #54 |
Grand Sorcerer
Posts: 12,752
Karma: 75000002
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
There has to exist a Windows API (or maybe direct registry queries) to replicate these commands:
Code:
assoc .jar .jar=jarfile ftype jarfile jarfile="C:\Program Files\Java\jre1.8.0_31\bin\javaw.exe" -jar "%1" %* |
11-11-2015, 02:36 PM | #55 | |
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)
|
Quote:
That link provides a way to search the current PATH, and determine what Code:
C:\> java.exe There would be no need to manually update either Doitsu's epubcheck plugin OR the calibre Open With plugin, because the calibre plugin is saving the java path before clearing everything else away. Trust me, I wasn't suggesting Yet Another Way to manually update it every time, I have no patience for manual updating myself. ... That being said, using calibre to open a book in Sigil is slightly roundabout, considering calibre has its own builtin Editor... I'd also like to know why, oh why, does Java feel the need to make highly unpredictable paths, and why has Microsoft never figured out how to provide a decent CLI, but that is getting waaaaaaaaaaaay offtopic. java is always /usr/bin/java on MY computer. |
|
11-11-2015, 04:43 PM | #56 | ||||
Bibliophagist
Posts: 40,545
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Quote:
... Quote:
Quote:
As for the unpredictable paths? There are quite a few programs that require a specific version of Java. Some install the Java files within their own directory, other's expect to find the version where the Sun/Oracle installer would place it. I supported Java 1.4.2 for quite a few years after 1.5 and 1.6 were released for that reason. Anyhow, time to let this thread die since we need the Hubbell to see the topic. Last edited by DNSB; 11-11-2015 at 04:45 PM. |
||||
11-11-2015, 04:43 PM | #57 | |
null operator (he/him)
Posts: 20,998
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
11-11-2015, 07:39 PM | #58 | |||
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)
|
Quote:
I've had one of those for a long time now... Quote:
Quote:
|
|||
11-11-2015, 11:22 PM | #59 |
creator of calibre
Posts: 44,546
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can also access the builtin open with functionality by right clicking the view button and choosing view specific format (or right clicking a book entry and choosing that).
|
11-11-2015, 11:33 PM | #60 | |
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:
I'll do a little testing and talk to kiwidude about updating the plugin. |
|
|
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 |