Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions simopt/experiment_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2860,9 +2860,9 @@ def check_common_problem_and_reference(

problem_list = [experiment.problem for experiment in experiments]
problem_err_msg = "All experiments must have the same problem."
assert all(
elem == problem_list[0] for elem in problem_list
), problem_err_msg
assert all(elem == problem_list[0] for elem in problem_list), (
problem_err_msg
)

x0_list = [experiment.x0 for experiment in experiments]
x0_err_msg = "All experiments must have the same starting solution."
Expand Down Expand Up @@ -6773,12 +6773,10 @@ def create_design(
# Replace backslashes with forward slashes
source_file_wsl = source_file_wsl.replace("\\", "/")
design_file_wsl = design_file_wsl.replace("\\", "/")
command = f"{command_file} -s {n_stacks} {source_file_wsl} > {design_file_wsl}"
command = f"{command_file} -s {n_stacks} '{source_file_wsl}' > '{design_file_wsl}'"
command = f'wsl -e bash -lic "{command}"'
else:
command = (
f"{command_file} -s {n_stacks} {source_file} > {design_file}"
)
command = f"{command_file} -s {n_stacks} '{source_file}' > '{design_file}'"
completed_process = subprocess.run(
command, capture_output=True, shell=True
)
Expand Down
4 changes: 3 additions & 1 deletion simopt/gui/new_experiment_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -1911,9 +1911,11 @@ def __create_design_core(self, base_object: str) -> None:
)

except Exception as e:
# Strip all ANSI codes from the error message
error_msg = re.sub(r"\x1b\[[0-?]*[ -/]*[@-~]", "", str(e))
messagebox.showerror(
"Error",
f"An error occurred while creating the design: {e}",
f"An error occurred while creating the design: {error_msg}",
)
return

Expand Down
Loading