您好,我正在与 Pyspark 合作,第一次使用 ML 包实现情感分析项目,cofde 工作正常,但突然间显示上述错误
有人可以帮忙吗这是完整的错误描述
ERROR:py4j.java_gateway:An error occurred while trying to connect to the Java server (127.0.0.1:50532)
Traceback (most recent call last):
File "C:\opt\spark\spark-2.3.0-bin-hadoop2.7\python\lib\py4j-0.10.6-src.zip\py4j\java_gateway.py", line 852, in _get_connection
connection = self.deque.pop()
IndexError: pop from an empty deque
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\opt\spark\spark-2.3.0-bin-hadoop2.7\python\lib\py4j-0.10.6-src.zip\py4j\java_gateway.py", line 990, in start
self.socket.connect((self.address, self.port))
ConnectionRefusedError: [WinError 10061] Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée
最佳答案
如果您使用的是 Jupyter nootbook,只需重新启动您的笔记本。如果没有,则只需重新启动 pyspark 。这应该可以解决问题。
发生这种情况是因为您使用了太多收集或其他一些与内存相关的问题。
关于Pyspark 错误 :py4j. java_gateway :An error occurred while trying to connect to the Java server (127. 0.0.1:50532),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51359802/