From f7c9000e9f9f17892e02bf7f0f30407308fb2872 Mon Sep 17 00:00:00 2001 From: PacificDou Date: Fri, 23 Aug 2024 08:59:07 +0000 Subject: [PATCH] set default job_id --- roboflow/models/inference.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roboflow/models/inference.py b/roboflow/models/inference.py index 9ec24f50..7d2f5653 100644 --- a/roboflow/models/inference.py +++ b/roboflow/models/inference.py @@ -302,7 +302,7 @@ def poll_for_video_results(self, job_id: Optional[str] = None) -> dict: if job_id is None: job_id = self.job_id - url = urljoin(API_URL, "/videoinfer/?api_key=" + self.__api_key + "&job_id=" + self.job_id) + url = urljoin(API_URL, "/videoinfer/?api_key=" + self.__api_key + "&job_id=" + job_id) try: response = requests.get(url, headers={"Content-Type": "application/json"}) except Exception as e: @@ -354,7 +354,7 @@ def poll_until_video_results(self, job_id) -> dict: while True: time.sleep(60) print(f"({attempts * 60}s): Checking for inference results") - response = self.poll_for_video_results() + response = self.poll_for_video_results(job_id) attempts += 1 if response != {}: