Ward Viaene created SPARK-3415: ---------------------------------- Summary: Using sys.stderr in pyspark results in error Key: SPARK-3415 URL: https://issues.apache.org/jira/browse/SPARK-3415 Project: Spark Issue Type: Bug Reporter: Ward Viaene
Using sys.stderr in pyspark results in: File "/home/spark-1.1/dist/python/pyspark/cloudpickle.py", line 660, in save_file from ..transport.adapter import SerializingAdapter ValueError: Attempted relative import beyond toplevel package Code to reproduce (copy paste the code in pyspark): import sys class TestClass(object): def __init__(self, out = sys.stderr): self.out = out def getOne(self): return 'one' def f(): print type(t) return 'ok' t = TestClass() a = [ 1 , 2, 3, 4, 5 ] b = sc.parallelize(a) b.map(lambda x: f()).first() -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org