Skip to content

Commit dab7e43

Browse files
committed
convertor fix
1 parent 5c8445d commit dab7e43

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/superannotate/lib/app/interface/sdk_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2305,7 +2305,7 @@ def delete_annotations(
23052305
23062306
:param project: project name or folder path (e.g., "project1/folder1")
23072307
:type project: str
2308-
:param item_names: image names. If None, all image annotations from a given project/folder will be deleted.
2308+
:param item_names: item names. If None, all item annotations from a given project/folder will be deleted.
23092309
:type item_names: list of strs
23102310
"""
23112311

src/superannotate/lib/core/usecases/models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import boto3
1010
import lib.core as constances
11+
from lib.core.enums import ProjectType
1112
import pandas as pd
1213
import requests
1314
from botocore.exceptions import ClientError
@@ -68,7 +69,8 @@ def validate_fuse(self):
6869
and self._include_fuse
6970
):
7071
raise AppValidationException(
71-
f"Include fuse functionality is not supported for projects containing {self._project.type} attached with URLs"
72+
"Include fuse functionality is not supported for projects containing "
73+
f"{ProjectType.get_name(self._project.type)} attached with URLs"
7274
)
7375

7476
def validate_folder_names(self):

src/superannotate/lib/core/video_convertor.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ def __init__(self, annotation_data: dict, fps: int):
4343

4444
@staticmethod
4545
def validate_annotations(annotation_data: dict):
46-
try:
47-
annotation_data["metadata"]["duration"]
48-
except KeyError:
46+
duration = annotation_data["metadata"].get("duration")
47+
if duration is None:
4948
raise AppException("Video not annotated yet")
5049

5150
def get_frame(self, frame_no: int):

0 commit comments

Comments
 (0)