You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/12/23 04:21:00 UTC

[jira] [Commented] (SPARK-37721) Failed to execute pyspark test in Win WSL

    [ https://issues.apache.org/jira/browse/SPARK-37721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17464277#comment-17464277 ] 

Apache Spark commented on SPARK-37721:
--------------------------------------

User 'Yikun' has created a pull request for this issue:
https://github.com/apache/spark/pull/34993

> Failed to execute pyspark test in Win WSL
> -----------------------------------------
>
>                 Key: SPARK-37721
>                 URL: https://issues.apache.org/jira/browse/SPARK-37721
>             Project: Spark
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 3.3.0
>            Reporter: Yikun Jiang
>            Priority: Major
>
>  
> {code:java}
> Launching unittests with arguments python -m unittest test_rdd.RDDTests.test_range in /home/yikun/spark/python/pyspark/testsTraceback (most recent call last):
>   File "/mnt/d/Program Files/JetBrains/PyCharm 2021.1.3/plugins/python/helpers/pycharm/_jb_unittest_runner.py", line 35, in <module>
>     sys.exit(main(argv=args, module=None, testRunner=unittestpy.TeamcityTestRunner, buffer=not JB_DISABLE_BUFFERING))
>   File "/usr/lib/python3.8/unittest/main.py", line 100, in __init__
>     self.parseArgs(argv)
>   File "/usr/lib/python3.8/unittest/main.py", line 147, in parseArgs
>     self.createTests()
>   File "/usr/lib/python3.8/unittest/main.py", line 158, in createTests
>     self.test = self.testLoader.loadTestsFromNames(self.testNames,
>   File "/usr/lib/python3.8/unittest/loader.py", line 220, in loadTestsFromNames
>     suites = [self.loadTestsFromName(name, module) for name in names]
>   File "/usr/lib/python3.8/unittest/loader.py", line 220, in <listcomp>
>     suites = [self.loadTestsFromName(name, module) for name in names]
>   File "/usr/lib/python3.8/unittest/loader.py", line 154, in loadTestsFromName
>     module = __import__(module_name)
>   File "/home/yikun/spark/python/pyspark/tests/test_rdd.py", line 37, in <module>
>     from pyspark.testing.utils import ReusedPySparkTestCase, SPARK_HOME, QuietTest
>   File "/home/yikun/spark/python/pyspark/testing/utils.py", line 47, in <module>
>     SPARK_HOME = os.environ["SPARK_HOME"]#_find_spark_home()
>   File "/usr/lib/python3.8/os.py", line 675, in __getitem__
>     raise KeyError(key) from None
> KeyError: 'SPARK_HOME' {code}
> Looks like we  should change "SPARK_HOME = os.environ["SPARK_HOME"]" to "SPARK_HOME = _find_spark_home()"
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org