File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ def load_values_blob_as_df(blob):
167
167
168
168
blob: google.cloud.storage.blob.Blob object"""
169
169
json_string = blob .download_as_string ()
170
+ json_string = json_string .decode ('utf-8' )
170
171
return values_json_to_df (json_string )
171
172
172
173
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ def testLoadValuesBlobAsDataframe(self):
22
22
"""Tests that data in json list format is loaded into a
23
23
pandas.DataFrame object using the first row as a header."""
24
24
mock_attrs = {
25
- 'download_as_string.return_value' : json .dumps (self ._test_data )}
25
+ 'download_as_string.return_value' : json .dumps (self ._test_data ). encode ( 'utf-8' ) }
26
26
mock_blob = Mock (** mock_attrs )
27
27
frame = gcs_to_bq_util .load_values_blob_as_df (mock_blob )
28
28
You can’t perform that action at this time.
0 commit comments