Skip to content

Python SDK for AI agent monitoring, LLM cost tracking, benchmarking, and more. Integrates with most LLMs and agent frameworks including CrewAI, Agno, OpenAI Agents SDK, Langchain, Autogen, AG2, and CamelAI

Fixing FileNotFoundError introduced by timetravel (#327)

Howard Gil640ca65c00b7
diff --git a/agentops/time_travel.py b/agentops/time_travel.py
index e7638438..be84e190 100644
--- a/agentops/time_travel.py
+++ b/agentops/time_travel.py
@@ -85,11 +85,14 @@ def check_time_travel_active():
parent_dir = os.path.dirname(script_dir)
config_file_path = os.path.join(parent_dir, ".agentops_time_travel.yaml")
- with open(config_file_path, "r") as config_file:
- config = yaml.safe_load(config_file)
- if config.get("Time_Travel_Debugging_Active", True):
- manage_time_travel_state(activated=True)
- return True
+ try:
+ with open(config_file_path, "r") as config_file:
+ config = yaml.safe_load(config_file)
+ if config.get("Time_Travel_Debugging_Active", True):
+ manage_time_travel_state(activated=True)
+ return True
+ except FileNotFoundError:
+ return False
return False