@@ -2353,7 +2353,6 @@ def fill_classes_data(self, annotations: dict):
23532353 attribute ["groupId" ]
23542354 ]["attributes" ]
23552355 ):
2356- del attribute ["groupId" ]
23572356 continue
23582357 attribute ["name" ] = annotation_classes [annotation_class_id ][
23592358 "attribute_groups"
@@ -3268,9 +3267,6 @@ def execute(self):
32683267 annotations ,
32693268 fuse_image ,
32703269 )
3271- logger .info (
3272- "Downloaded image %s to %s." , self ._image .name , str (download_path )
3273- )
32743270
32753271 return self ._response
32763272
@@ -4067,6 +4063,8 @@ def download_to_local_storage(self, destination: str):
40674063 project_id = self ._project .uuid ,
40684064 export_id = export ["id" ],
40694065 )
4066+ if "error" in export :
4067+ raise AppException (export ["error" ])
40704068 export_status = export ["status" ]
40714069 if export_status in (ExportStatus .ERROR .value , ExportStatus .CANCELED .value ):
40724070 raise AppException ("Couldn't download export." )
@@ -4877,7 +4875,7 @@ def _upload_image(self, image_path: str):
48774875 else :
48784876 try :
48794877 image_bytes = io .BytesIO (open (image_path , "rb" ).read ())
4880- except FileNotFoundError :
4878+ except OSError :
48814879 return ProcessedImage (
48824880 uploaded = False ,
48834881 path = image_path ,
@@ -4927,10 +4925,6 @@ def images_to_upload(self):
49274925 [extension in path for extension in self .exclude_file_patterns ]
49284926 )
49294927 ]
4930- excluded_paths = [path for path in paths if path not in filtered_paths ]
4931- if excluded_paths :
4932- logger .info (f"Excluded paths { ', ' .join (excluded_paths )} " )
4933-
49344928 image_entities = (
49354929 GetBulkImages (
49364930 service = self ._backend_client ,
@@ -4994,8 +4988,6 @@ def execute(self):
49944988 duplications .extend (attach_duplications )
49954989 uploaded = [image ["name" ] for image in uploaded ]
49964990 failed_images = [image .split ("/" )[- 1 ] for image in failed_images ]
4997- if duplications :
4998- logger .info (f"Duplicated images { ', ' .join (duplications )} " )
49994991 self ._response .data = uploaded , failed_images , duplications
50004992 return self ._response
50014993
0 commit comments