Skip to content

Commit

Permalink
Fix for KeyError: 'Start'
Browse files Browse the repository at this point in the history
  File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\site-packages\rfswarm_manager\rfswarm.py", line 2055, in UpdateRunStats_SQL
    sql += "WHERE r.start_time>{} ".format(base.robot_schedule["Start"])
KeyError: 'Start'
  • Loading branch information
damies13 committed Sep 14, 2024
1 parent 461b962 commit 737e937
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rfswarm_manager/rfswarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,8 @@ class RFSwarmBase:
run_paused = False
run_threads: Any = {}
total_robots = 0
robot_schedule = {"RunName": "", "Agents": {}, "Scripts": {}, "Start": 0}
robot_schedule_template = {"RunName": "", "Agents": {}, "Scripts": {}, "Start": 0}
robot_schedule = self.robot_schedule_template
envvars: Any = {}
agentserver = None
agenthttpserver = None
Expand Down Expand Up @@ -3366,7 +3367,7 @@ def ClickPlay(self, _event=None):
base.run_paused = False
base.MetricIDs = {}

base.robot_schedule = {"RunName": "", "Agents": {}, "Scripts": {}}
base.robot_schedule = base.robot_schedule_template

warnings = self.Pre_Run_Checks()
if len(warnings) > 0:
Expand Down Expand Up @@ -3571,7 +3572,7 @@ def run_start_threads(self):

if base.run_start < 1:
base.run_start = int(time.time()) # time now
base.robot_schedule = {}
base.robot_schedule = base.robot_schedule_template
base.robot_schedule["RunName"] = base.run_name
base.robot_schedule["Agents"] = {}
base.robot_schedule["Scripts"] = {}
Expand Down

0 comments on commit 737e937

Please sign in to comment.