@@ -532,7 +532,7 @@ async def get_annotation(
532532 if self ._project .type == constants .ProjectType .PIXEL .value :
533533 mask = self .get_annotation_from_s3 (self ._client_s3_bucket , mask_path )
534534 else :
535- async with aiofiles .open (path ) as file :
535+ async with aiofiles .open (path , encoding = "utf-8" ) as file :
536536 content = await file .read ()
537537 if self ._project .type == constants .ProjectType .PIXEL .value :
538538 async with aiofiles .open (mask_path , "rb" ) as mask :
@@ -835,7 +835,9 @@ def _get_annotation_json(self) -> tuple:
835835 ),
836836 )
837837 else :
838- annotation_json = json .load (open (self ._annotation_path ))
838+ annotation_json = json .load (
839+ open (self ._annotation_path , encoding = "utf-8" )
840+ )
839841 if self ._project .type == constants .ProjectType .PIXEL .value :
840842 mask = open (
841843 self ._annotation_path .replace (
@@ -1313,7 +1315,7 @@ def download_annotation_classes(self, path: str):
13131315 if response .ok :
13141316 classes_path = Path (path ) / "classes"
13151317 classes_path .mkdir (parents = True , exist_ok = True )
1316- with open (classes_path / "classes.json" , "w+" ) as file :
1318+ with open (classes_path / "classes.json" , "w+" , encoding = "utf-8" ) as file :
13171319 json .dump (
13181320 [
13191321 i .dict (
0 commit comments