Skip to content

Commit 40dec39

Browse files
authored
Merge pull request #834 from Labelbox/ms/file-uploads-520s
retry 520s
2 parents bbf498e + d1889e6 commit 40dec39

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
# Version 3.35.0 (2023-01-18)
4+
### Fixed
5+
* Retry 520 errors when uploading files
6+
37
# Version 3.34.0 (2022-12-22)
48
### Added
59
* Added `get_by_name()` method to MetadataOntology object to access both custom and reserved metadata by name.

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
copyright = '2021, Labelbox'
2222
author = 'Labelbox'
2323

24-
release = '3.34.0'
24+
release = '3.35.0'
2525

2626
# -- General configuration ---------------------------------------------------
2727

labelbox/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name = "labelbox"
2-
__version__ = "3.34.0"
2+
__version__ = "3.35.0"
33

44
from labelbox.client import Client
55
from labelbox.schema.project import Project

labelbox/client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,8 @@ def upload_data(self,
377377
raise labelbox.exceptions.InternalServerError(error_502)
378378
elif response.status_code == 503:
379379
raise labelbox.exceptions.InternalServerError(response.text)
380+
elif response.status_code == 520:
381+
raise labelbox.exceptions.InternalServerError(response.text)
380382

381383
try:
382384
file_data = response.json().get("data", None)
@@ -1161,9 +1163,9 @@ def get_data_row_ids_for_global_keys(
11611163
'Status' contains the outcome of this job. It can be one of
11621164
'Success', 'Partial Success', or 'Failure'.
11631165

1164-
'Results' contains a list of the fetched corresponding data row ids in the input order.
1165-
For data rows that cannot be fetched due to an error, or data rows that do not exist,
1166-
empty string is returned at the position of the respective global_key.
1166+
'Results' contains a list of the fetched corresponding data row ids in the input order.
1167+
For data rows that cannot be fetched due to an error, or data rows that do not exist,
1168+
empty string is returned at the position of the respective global_key.
11671169
More error information can be found in the 'Errors' section.
11681170

11691171
'Errors' contains a list of global_keys that could not be fetched, along

0 commit comments

Comments
 (0)