Skip to content

Commit 8e3675a

Browse files
sfc-gh-stakedaankit-bhatnagar167
authored andcommitted
SNOW-99281: fixed test failures due to ijson 2.5 behavior change.
1 parent c2f4166 commit 8e3675a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

chunk_downloader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from .errors import (Error, OperationalError)
1616
from .time_util import get_time_millis
1717
import json
18-
from io import StringIO
18+
from io import BytesIO
1919
from gzip import GzipFile
2020

2121
try:
@@ -308,7 +308,7 @@ def to_iterator(self, raw_data_fd, download_time):
308308
elif not self._use_ijson:
309309
ret = iter(json.loads(raw_data))
310310
else:
311-
ret = split_rows_from_stream(StringIO(raw_data))
311+
ret = split_rows_from_stream(BytesIO(raw_data.encode('utf-8')))
312312

313313
parse_end_time = get_time_millis()
314314

0 commit comments

Comments
 (0)