Skip to content

Commit

Permalink
added no timestep error exception
Browse files Browse the repository at this point in the history
  • Loading branch information
SamCox822 committed Feb 27, 2024
1 parent c188c95 commit de68426
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions mdagent/tools/base_tools/analysis_tools/plot_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def plot_data(self) -> str:
time_or_step = self.matched_headers[0][1]
xlab = "step" if "step" in time_or_step.lower() else "time"
else:
return "No 'step' or 'time' headers found."
raise ValueError("No timestep found.")

failed_headers = []
created_plots = []
Expand Down Expand Up @@ -120,10 +120,6 @@ def _run(self, file_id: str) -> str:
return "Figures created: " + plot_result
else:
return "No figures created."
except ValueError:
return "File could not be processed."
except FileNotFoundError:
return "Issue with CSV file, file not found."
except Exception as e:
return str(e)

Expand Down

0 comments on commit de68426

Please sign in to comment.