From 11b4acc81a600bb935c0a9edca80aee8b464a20f Mon Sep 17 00:00:00 2001 From: raphael60650 Date: Thu, 17 Jun 2021 00:18:42 +0200 Subject: [PATCH] fixed to convert the wu8 file --- source/patch_file.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/patch_file.py b/source/patch_file.py index a08dda5..abd6b33 100644 --- a/source/patch_file.py +++ b/source/patch_file.py @@ -27,7 +27,7 @@ def patch_file(self): tracks.extend(ctconfig["tracks_list"]) total_track = len(tracks) - max_step = len(fc["img"]) + (total_track * 2) + 3 + len("EGFIS") + max_step = len(fc["img"]) + total_track + 3 + len("EGFIS") self.Progress(show=True, indeter=False, statut=self.translate("Conversion des fichiers"), max=max_step, step=0) self.Progress(statut=self.translate("Configuration de LE-CODE"), add=1) @@ -93,9 +93,8 @@ def patch_file(self): os.remove(track_szs_file) if not(os.path.exists(track_szs_file)): - print(f"convert {track_szs_file}") process_list[track_szs_file] = subprocess.Popen([ - "./tools/szs/wszst", "NORMALIZE", track_file, "--DEST", + "./tools/szs/wszst", "NORMALIZE", track_wu8_file, "--DEST", "./file/Track/%N.szs", "--szs", "--overwrite", "--autoadd-path", "./file/auto-add/"], creationflags=CREATE_NO_WINDOW, stderr=subprocess.PIPE) break @@ -108,6 +107,7 @@ def patch_file(self): stderr = process_list[process].stderr.read() if b"wszst: ERROR" in stderr: # Error occured process_list.pop(process) + print(process, stderr) os.remove(process) error_count += 1 if error_count > error_max: # Too much track wasn't correctly converted