From ef6f491d9437ac97cab9967fdb09f053c4b261a1 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Fri, 28 Oct 2022 22:42:11 +0530 Subject: [PATCH] Write lines, please --- ui/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/server.py b/ui/server.py index f8a5ff62..b9ea1b48 100644 --- a/ui/server.py +++ b/ui/server.py @@ -113,7 +113,7 @@ def setConfig(config): print('Add the line "@set CUDA_VISIBLE_DEVICES=N" where N is the GPUs to use to config.bat') config_bat_path = os.path.join(CONFIG_DIR, 'config.bat') with open(config_bat_path, 'w', encoding='utf-8') as f: - f.writelines(config_bat) + f.write('\r\n'.join(config_bat)) except Exception as e: print(traceback.format_exc()) @@ -128,7 +128,7 @@ def setConfig(config): print('Add the line "CUDA_VISIBLE_DEVICES=N" where N is the GPUs to use to config.sh') config_sh_path = os.path.join(CONFIG_DIR, 'config.sh') with open(config_sh_path, 'w', encoding='utf-8') as f: - f.writelines(config_sh) + f.write('\n'.join(config_sh)) except Exception as e: print(traceback.format_exc())