Skip to content

Commit 8a959f0

Browse files
author
Adrian Chang
committed
ignore meta file partials
1 parent bee9891 commit 8a959f0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

libs/labelbox/src/labelbox/schema/export_task.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,12 @@ def read(self) -> Iterator[Tuple[_MetadataFileInfo, str]]:
448448
with tempfile.NamedTemporaryFile(mode='w+', delete=False) as temp_file:
449449
result = self._retrieval_strategy.get_next_chunk()
450450
while result:
451-
file_info, raw_data = result
452-
temp_file.seek(file_info.offsets.start)
451+
_, raw_data = result
452+
# there is something wrong with the way the offsets are being calculated
453+
# so just write all of the chunks as is too the file, with pointer initially
454+
# pointed to the start of the file (like what is in GCS) and do not
455+
# rely on offsets for file location
456+
# temp_file.seek(file_info.offsets.start)
453457
temp_file.write(raw_data)
454458
result = self._retrieval_strategy.get_next_chunk()
455459
# read buffer

0 commit comments

Comments
 (0)