Quote:
Originally Posted by Doitsu
That's not good. Theoretically, it should have displayed a custom message, which I added to the code in the last version.
|
I've looked into your code and found this:
Code:
if returncode == 1 and 'EPUBCheck' not in stdout:
QApplication.restoreOverrideCursor()
QMessageBox.critical(self.gui, "Fatal Java error", stdout + '\n' + stderr)
return
The problem is EPUBCheck produces a Summary even with the error. So your test won't pass the second condition.
If you let me, I have a suggestion to deal with the 32/64-Bit java versions:
Code:
# check java version
import subprocess
check = subprocess.check_output(["java", "-version"], stderr=subprocess.STDOUT)
# define epubcheck command line parameters
if '64-Bit' not in check:
args = [java_path, '-Xss1024k', '-jar', epc_path, '--version']
else:
args = [java_path, '-jar', epc_path, '--version']
P.S.: I've also tested on a PC with Windows 10 x64 and Java 32-Bit and the error happens. Looks like any PC with a Java 32-Bit may have this problem.