Description
If a remote Spark session is stopped, trying to invoke any session operations will result in a ValueError. For example:
spark.stop() spark.sql("select 1") ValueError: Cannot invoke RPC: Channel closed! During handling of the above exception, another exception occurred: Traceback (most recent call last): ... return e.code() == grpc.StatusCode.UNAVAILABLE AttributeError: 'ValueError' object has no attribute 'code'