Skip to content

Commit eb7a69d

Browse files
committed
fix: make sure a string is returned
1 parent 678912a commit eb7a69d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

roboflow/core/project.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,9 @@ def _annotation_params(self, annotation_path):
553553

554554
def _parse_upload_error(self, error: rfapi.UploadError) -> str:
555555
dict_part = str(error).split(": ", 2)[2]
556-
parsed_dict = ast.literal_eval(dict_part)
557-
return parsed_dict.get("message")
556+
parsed_dict: dict = ast.literal_eval(dict_part)
557+
message = parsed_dict.get("message")
558+
return message or str(parsed_dict)
558559

559560
def search(
560561
self,

0 commit comments

Comments
 (0)