summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSumanto Kar2025-06-22 12:26:25 +0530
committerGitHub2025-06-22 12:26:25 +0530
commit9b4683a1baf7eb5ad96b8aeb6bccfe16295d7cba (patch)
tree437d67f9dde7e2c0b85e68bb2bedf5114b154249
parent64b3dbc43cdb25d9ab453c7fdd3e1e31cdca4644 (diff)
downloadeSim-9b4683a1baf7eb5ad96b8aeb6bccfe16295d7cba.tar.gz
eSim-9b4683a1baf7eb5ad96b8aeb6bccfe16295d7cba.tar.bz2
eSim-9b4683a1baf7eb5ad96b8aeb6bccfe16295d7cba.zip
Fixed Path issues LtspiceLibConverter.py
-rw-r--r--src/converter/LtspiceLibConverter.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/converter/LtspiceLibConverter.py b/src/converter/LtspiceLibConverter.py
index 1914f8ba..83f0414e 100644
--- a/src/converter/LtspiceLibConverter.py
+++ b/src/converter/LtspiceLibConverter.py
@@ -23,10 +23,11 @@ class LTspiceLibConverter:
# Construct the full path to libParser.py
parser_path = os.path.join(script_dir, relative_parser_path)
print(parser_path)
- command = f"cd {parser_path} ; python3 lib_LTspice2Kicad.py {file_path}"
- print(f"cd {parser_path} ; python3 lib_LTspice2Kicad.py {file_path}")
+ command = ["python3", "lib_LTspice2Kicad.py", file_path]
+ print("Running command:", " ".join(command), "in", parser_path)
try:
- subprocess.run(command, shell=True, check=True)
+ subprocess.run(command, check=True, cwd=parser_path)
+
# Message box with the conversion success message
msg_box = QMessageBox()
msg_box.setIcon(QMessageBox.Information)
@@ -81,4 +82,4 @@ class LTspiceLibConverter:
msg_box.setWindowTitle("No File Selected")
msg_box.setText("Please select a file before uploading.")
msg_box.setStandardButtons(QMessageBox.Ok)
- msg_box.exec_() \ No newline at end of file
+ msg_box.exec_()