Skip to content

Commit

Permalink
[SPARK-20947][PYTHON] Fix encoding/decoding error in pipe action
Browse files Browse the repository at this point in the history
  • Loading branch information
王晓哲 committed Jun 12, 2017
1 parent d140918 commit 1b13e34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/pyspark/rdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ def func(iterator):

def pipe_objs(out):
for obj in iterator:
s = str(obj).rstrip('\n') + '\n'
s = unicode(obj).rstrip('\n') + '\n'
out.write(s.encode('utf-8'))
out.close()
Thread(target=pipe_objs, args=[pipe.stdin]).start()
Expand Down

0 comments on commit 1b13e34

Please sign in to comment.