From 90e7f868bc115da821c0f04dbafd80ef72e7490a Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Thu, 2 Mar 2023 08:31:29 +0100 Subject: [PATCH 2/2] Missing experimental add-on module ROOT.RDF.Experimental.Distributed (DistRDF) should not fail the loading of the rest of the ROOT.RDF namespace. --- bindings/pyroot/pythonizations/python/ROOT/_facade.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bindings/pyroot/pythonizations/python/ROOT/_facade.py b/bindings/pyroot/pythonizations/python/ROOT/_facade.py index 865321e713..69046fc71c 100644 --- a/bindings/pyroot/pythonizations/python/ROOT/_facade.py +++ b/bindings/pyroot/pythonizations/python/ROOT/_facade.py @@ -336,8 +336,11 @@ class ROOTFacade(types.ModuleType): ns.FromNumpy = MakeNumpyDataFrame if sys.version_info >= (3, 8): - # Inject Experimental.Distributed package into namespace RDF - ns.Experimental.Distributed = _create_rdf_experimental_distributed_module(ns.Experimental) + try: + # Inject Experimental.Distributed package into namespace RDF if available + ns.Experimental.Distributed = _create_rdf_experimental_distributed_module(ns.Experimental) + except ImportError: + pass except: raise Exception('Failed to pythonize the namespace RDF') del type(self).RDF -- 2.39.2