diff --git a/backtrader/utils/autodict.py b/backtrader/utils/autodict.py
index <HASH>..<HASH> 100644
--- a/backtrader/utils/autodict.py
+++ b/backtrader/utils/autodict.py
@@ -43,7 +43,13 @@ class AutoDict(dict):
             if isinstance(val, (AutoDict, AutoOrderedDict)):
                 val._close()
 
+    def _open(self):
+        self._closed = False
+
     def __missing__(self, key):
+        if self._closed:
+            raise KeyError
+
         value = self[key] = type(self)()
         return value
Add exception raising to AutoDict if closed and _open method