File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
libs/labelbox/src/labelbox/schema Expand file tree Collapse file tree 1 file changed +8
-6
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
- import json
6
9
from typing import (
10
+ TYPE_CHECKING ,
11
+ Any ,
7
12
Callable ,
8
13
Generic ,
9
14
Iterator ,
10
15
Optional ,
11
16
Tuple ,
12
17
TypeVar ,
13
18
Union ,
14
- TYPE_CHECKING ,
15
- Any ,
16
19
)
17
20
18
21
import requests
19
- import tempfile
20
- import os
22
+ from pydantic import BaseModel
21
23
22
24
from labelbox .schema .task import Task
23
25
from labelbox .utils import _CamelCaseMixin
24
- from pydantic import BaseModel
25
26
26
27
if TYPE_CHECKING :
27
28
from labelbox import Client
@@ -120,6 +121,7 @@ def _get_file_content(
120
121
)
121
122
response = requests .get (file_info .file , timeout = 30 )
122
123
response .raise_for_status ()
124
+ response .encoding = "utf-8"
123
125
assert (
124
126
len (response .content )
125
127
== file_info .offsets .end - file_info .offsets .start + 1
You can’t perform that action at this time.
0 commit comments