View Single Post
Old 06-01-2019, 05:47 PM   #61
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,223
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
Quote:
Originally Posted by Doitsu View Post
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.
thiago.eec is online now   Reply With Quote