From 6c742a30be94c85dc216c185514e2407ab0954d9 Mon Sep 17 00:00:00 2001 From: lawhead Date: Mon, 11 Nov 2024 15:42:25 -0800 Subject: [PATCH] Quote pathname when loading the params_form from BCInterface to handle paths with spaces --- bcipy/gui/BCInterface.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bcipy/gui/BCInterface.py b/bcipy/gui/BCInterface.py index 3a4c7913..ae7a7892 100644 --- a/bcipy/gui/BCInterface.py +++ b/bcipy/gui/BCInterface.py @@ -1,10 +1,10 @@ +import logging import subprocess import sys -import logging from typing import List from bcipy.config import (BCIPY_ROOT, DEFAULT_PARAMETERS_PATH, - STATIC_IMAGES_PATH, PROTOCOL_LOG_FILENAME) + PROTOCOL_LOG_FILENAME, STATIC_IMAGES_PATH) from bcipy.gui.main import (AlertMessageResponse, AlertMessageType, AlertResponse, BCIGui, app, contains_special_characters, contains_whitespaces, @@ -316,7 +316,7 @@ def edit_parameters(self) -> None: return None output = subprocess.check_output( - f'python {BCIPY_ROOT}/gui/parameters/params_form.py -p {self.parameter_location}', + f'python {BCIPY_ROOT}/gui/parameters/params_form.py -p "{self.parameter_location}"', shell=True) if output: self.parameter_location = output.decode().strip()