Skip to content

Commit 1df8e69

Browse files
author
Matt Sokoloff
committed
cleaner
1 parent 3a95890 commit 1df8e69

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

labelbox/schema/task.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ def errors(self) -> Optional[Dict[str, Any]]:
9494
elif self.status == "COMPLETE":
9595
return self.failed_data_rows
9696
elif self.type == "export-data-rows":
97-
self.wait_till_done(timeout_seconds=600)
98-
if self.errors_url:
99-
return self._fetch_remote_json(remote_json_field='errors_url')
97+
return self._fetch_remote_json(remote_json_field='errors_url')
10098
elif self.type == "add-data-rows-to-batch" or self.type == "send-to-task-queue":
10199
if self.status == "FAILED":
102100
# for these tasks, the error is embedded in the result itself
@@ -140,6 +138,10 @@ def _fetch_remote_json(self,
140138

141139
def download_result(remote_json_field: Optional[str], format: str):
142140
url = getattr(self, remote_json_field or 'result_url')
141+
142+
if url is None:
143+
return None
144+
143145
response = requests.get(url)
144146
response.raise_for_status()
145147
if format == 'json':

0 commit comments

Comments
 (0)