File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1111from labelbox .schema .data_row import DataRow
1212from labelbox .orm import query
1313from labelbox .schema .bulk_import_request import BulkImportRequest
14- from labelbox .exceptions import InvalidQueryError
14+ from labelbox .exceptions import InvalidQueryError , LabelboxError
1515from labelbox .orm .db_object import DbObject , Updateable , Deletable
1616from labelbox .orm .model import Entity , Field , Relationship
1717from labelbox .pagination import PaginatedCollection
@@ -179,10 +179,14 @@ def export_queued_data_rows(self, timeout_seconds=120):
179179 res = res ["exportQueuedDataRows" ]
180180 if res ["status" ] == "COMPLETE" :
181181 return res ["downloadUrl" ]
182+ elif res ["status" ] == "FAILED" :
183+ raise LabelboxError ("Data row export failed." )
182184
183185 timeout_seconds -= sleep_time
184186 if timeout_seconds <= 0 :
185- return None
187+ raise LabelboxError (
188+ f"Unable to export data rows within { timeout_seconds } seconds."
189+ )
186190
187191 logger .debug (
188192 "Project '%s' queued data row export, waiting for server..." ,
You can’t perform that action at this time.
0 commit comments