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 11
11
from labelbox .schema .data_row import DataRow
12
12
from labelbox .orm import query
13
13
from labelbox .schema .bulk_import_request import BulkImportRequest
14
- from labelbox .exceptions import InvalidQueryError
14
+ from labelbox .exceptions import InvalidQueryError , LabelboxError
15
15
from labelbox .orm .db_object import DbObject , Updateable , Deletable
16
16
from labelbox .orm .model import Entity , Field , Relationship
17
17
from labelbox .pagination import PaginatedCollection
@@ -179,10 +179,14 @@ def export_queued_data_rows(self, timeout_seconds=120):
179
179
res = res ["exportQueuedDataRows" ]
180
180
if res ["status" ] == "COMPLETE" :
181
181
return res ["downloadUrl" ]
182
+ elif res ["status" ] == "FAILED" :
183
+ raise LabelboxError ("Data row export failed." )
182
184
183
185
timeout_seconds -= sleep_time
184
186
if timeout_seconds <= 0 :
185
- return None
187
+ raise LabelboxError (
188
+ f"Unable to export data rows within { timeout_seconds } seconds."
189
+ )
186
190
187
191
logger .debug (
188
192
"Project '%s' queued data row export, waiting for server..." ,
You can’t perform that action at this time.
0 commit comments