Skip to content

Commit 8abe81d

Browse files
committed
GUI execution successfully with log flags.
Output files generated. Modified the main file to include flags and env vars properly. Env vars set to system default for ease.
1 parent 74f63a6 commit 8abe81d

File tree

5 files changed

+4
-3
lines changed

5 files changed

+4
-3
lines changed
Binary file not shown.
Binary file not shown.
19.5 KB
Binary file not shown.
40.2 KB
Binary file not shown.

main.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,18 +170,19 @@ def run_app(self):
170170
app_path,
171171
"-inputPath=" + working_dir,
172172
"-override",
173-
f"startTime={start_time},stopTime={stop_time}stepSize=0.002",
173+
f"startTime={start_time},stopTime={stop_time},stepSize=0.002",
174174
"-r=" + output_file,
175-
"-logFormat=xmltcp",
176175
"-lv=LOG_STDOUT,LOG_STATS",
177176
]
177+
env = os.environ.copy() # Copy current environment from PATH
178178

179179
try:
180180
# Run the subprocess and capture output
181181
result = subprocess.run(
182182
command,
183183
cwd=working_dir,
184184
capture_output=True,
185+
env=env,
185186
text=True,
186187
check=True,
187188
)
@@ -195,7 +196,7 @@ def run_app(self):
195196
QMessageBox.critical(
196197
self,
197198
"Execution Error",
198-
f"Error during simulation:\n{e.stderr}",
199+
f"Error simulation:\n{e.stderr}\n\nOutput:\n{e.stdout}",
199200
)
200201
except FileNotFoundError:
201202
QMessageBox.critical(

0 commit comments

Comments
 (0)