diff --git a/bindings/experimental/distrdf/python/DistRDF/Backends/Spark/Backend.py b/bindings/experimental/distrdf/python/DistRDF/Backends/Spark/Backend.py index a1b3160610324..1372731989c37 100644 --- a/bindings/experimental/distrdf/python/DistRDF/Backends/Spark/Backend.py +++ b/bindings/experimental/distrdf/python/DistRDF/Backends/Spark/Backend.py @@ -19,10 +19,9 @@ try: import pyspark -except ModuleNotFoundError: - raise ModuleNotFoundError( - ("cannot import module 'pyspark'." - " Please make sure Spark is installed.")) +except ImportError: + raise ImportError(("cannot import module 'pyspark'. Refer to the Apache Spark documentation " + "for installation instructions.")) class SparkBackend(Base.BaseBackend):