File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
libs/labelbox/src/labelbox/schema Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change
1
+ import json
2
+ import os
3
+ import tempfile
4
+ import warnings
1
5
from abc import ABC , abstractmethod
2
6
from dataclasses import dataclass
3
7
from enum import Enum
4
8
from functools import lru_cache
5
9
from io import TextIOWrapper
6
- import json
7
10
from pathlib import Path
8
11
from typing import (
12
+ TYPE_CHECKING ,
13
+ Any ,
9
14
Callable ,
10
15
Generic ,
11
16
Iterator ,
14
19
Tuple ,
15
20
TypeVar ,
16
21
Union ,
17
- TYPE_CHECKING ,
18
22
overload ,
19
- Any ,
20
23
)
21
24
22
25
import requests
23
- import warnings
24
- import tempfile
25
- import os
26
+ from pydantic import BaseModel
26
27
27
28
from labelbox .schema .task import Task
28
29
from labelbox .utils import _CamelCaseMixin
29
- from pydantic import BaseModel , Field , AliasChoices
30
30
31
31
if TYPE_CHECKING :
32
32
from labelbox import Client
@@ -241,6 +241,7 @@ def _get_file_content(
241
241
)
242
242
response = requests .get (file_info .file , timeout = 30 )
243
243
response .raise_for_status ()
244
+ response .encoding = "utf-8"
244
245
assert (
245
246
len (response .content )
246
247
== file_info .offsets .end - file_info .offsets .start + 1
You can’t perform that action at this time.
0 commit comments