diff --git a/katrain/KataGo/katago-bs52.exe b/katrain/KataGo/katago-bs52.exe deleted file mode 100644 index 98e365c..0000000 Binary files a/katrain/KataGo/katago-bs52.exe and /dev/null differ diff --git a/katrain/KataGo/katago-cpu b/katrain/KataGo/katago-cpu new file mode 100755 index 0000000..c2f2956 Binary files /dev/null and b/katrain/KataGo/katago-cpu differ diff --git a/katrain/config.json b/katrain/config.json index 47b26ad..c5770b4 100644 --- a/katrain/config.json +++ b/katrain/config.json @@ -16,7 +16,7 @@ "anim_pv_time": 0.5, "debug_level": 0, "lang": "en", - "version": "1.3.4" + "version": "1.3.5" }, "timer": { "byo_length": 30, diff --git a/katrain/core/constants.py b/katrain/core/constants.py index 150687e..2b86515 100644 --- a/katrain/core/constants.py +++ b/katrain/core/constants.py @@ -1,4 +1,4 @@ -VERSION = "1.3.4" +VERSION = "1.3.5" HOMEPAGE = "https://github.com/sanderland/katrain" CONFIG_MIN_VERSION = "1.3.3" # keep config files from this version diff --git a/katrain/core/engine.py b/katrain/core/engine.py index 25a8471..b8767a4 100644 --- a/katrain/core/engine.py +++ b/katrain/core/engine.py @@ -1,7 +1,7 @@ import copy import json import os -import shlex, subprocess +import subprocess import threading import time import traceback @@ -82,9 +82,8 @@ class KataGoEngine: def start(self): try: self.katrain.log(f"Starting KataGo with {self.command}", OUTPUT_DEBUG) - self.katago_process = subprocess.Popen( - shlex.split(self.command), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True + self.command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True ) except (FileNotFoundError, PermissionError, OSError) as e: self.katrain.log( @@ -150,7 +149,7 @@ class KataGoEngine: def _analysis_read_thread(self): while self.katago_process is not None: try: - line = self.katago_process.stdout.readline() + line = self.katago_process.stdout.readline().strip() if self.katago_process and not line: self.check_alive(exception_if_dead=True) except OSError as e: