diff --git a/DDCore/python/dd4hep_base.py b/DDCore/python/dd4hep_base.py
index 5a82370b6b9c51f78f1c4c38d7851303f8399ce2..9b10e4b5cf046173662a55cc2c20bbd28edb21f1 100644
--- a/DDCore/python/dd4hep_base.py
+++ b/DDCore/python/dd4hep_base.py
@@ -254,5 +254,6 @@ try:
     return len(items)    
 except:
   print 'WARNING: No units from TGeoUnit can be imported. This is normal for ROOT < 6.12.0'
+  TGeoUnits = {}
   def import_units():
     return 0