Skip to content

Commit ad00e6b

Browse files
clouds56apetresc
authored andcommitted
Fix decode json error at trailing empty line (#483)
1 parent 6b46996 commit ad00e6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sparkmagic/sparkmagic/utils/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def records_to_dataframe(records_text, kind, coerce=None):
5353
if records_text in ['', '[]']:
5454
strings = []
5555
else:
56-
strings = records_text.split('\n')
56+
strings = records_text.strip().split('\n')
5757
try:
5858
data_array = [json.JSONDecoder(object_pairs_hook=OrderedDict).decode(s) for s in strings]
5959

0 commit comments

Comments
 (0)