Skip to content

Commit 63d97a5

Browse files
GMinoruyGui-FernandesBR
authored andcommitted
ENH: corrects errors identified during testing
1 parent 2b74f59 commit 63d97a5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

rocketpy/simulation/monte_carlo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -591,8 +591,8 @@ def __evaluate_flight_outputs(self, flight, sim_idx):
591591

592592
def export_results(self, output_filename, output_format):
593593
txt_data = []
594-
with open(self.filename, "r", encoding="utf-8") as f:
595-
for line in enumerate(f):
594+
with open(f"{self.filename}.outputs.txt", "r", encoding="utf-8") as f:
595+
for line in f:
596596
line = line.strip()
597597
data = json.loads(line)
598598
txt_data.append(data)
@@ -603,7 +603,7 @@ def export_results(self, output_filename, output_format):
603603
json.dump(txt_data, f, indent=4)
604604
elif output_format == "csv":
605605
output_csv_header = txt_data[0].keys()
606-
with open(f"{output_filename}.csv", "w", newLine='', encoding="utf-8") as f:
606+
with open(f"{output_filename}.csv", "w", newline= "") as f:
607607
output_writer = csv.DictWriter(f, fieldnames=output_csv_header)
608608
output_writer.writeheader()
609609
output_writer.writerows(txt_data)

0 commit comments

Comments
 (0)