Skip to content

Commit 85fa852

Browse files
committed
fix: add missing replaces
1 parent 2aee263 commit 85fa852

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

roboflow/core/project.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,12 @@ def _parse_upload_error(self, error: rfapi.UploadError) -> str:
555555
dict_part = str(error).split(": ", 2)[2]
556556
if re.search(r"'\w+':", dict_part):
557557
temp_str = dict_part.replace(r"\'", "<PLACEHOLDER>")
558+
temp_str = temp_str.replace('"', r"\"")
558559
temp_str = temp_str.replace("'", '"')
559560
dict_part = temp_str.replace("<PLACEHOLDER>", "'")
561+
dict_part = dict_part.replace("True", "true")
562+
dict_part = dict_part.replace("False", "false")
563+
dict_part = dict_part.replace("None", "null")
560564
parsed_dict: dict = json.loads(dict_part)
561565
message = parsed_dict.get("message")
562566
return message or str(parsed_dict)

0 commit comments

Comments
 (0)