diff --git a/include/aidge/utils/DynamicAttributes.hpp b/include/aidge/utils/DynamicAttributes.hpp index 52056852bc454f65f7d12cfc0608e5b6b0b1d933..1b55d7afbf8263a77cf70752fc92f72ef5027904 100644 --- a/include/aidge/utils/DynamicAttributes.hpp +++ b/include/aidge/utils/DynamicAttributes.hpp @@ -166,7 +166,14 @@ public: attributes[elt.first.c_str()] = future_std::any_cast<const DynamicAttributes&>(elt.second).dict(); } else { - attributes[elt.first.c_str()] = mAnyUtils.at(elt.second.type())->cast(elt.second); + // At this point, not every attribute may be known to mAnyUtils + const auto anyUtilsIt = mAnyUtils.find(elt.second.type()); + if (anyUtilsIt != mAnyUtils.end()) { + attributes[elt.first.c_str()] = anyUtilsIt->second->cast(elt.second); + } + else { + attributes[elt.first.c_str()] = "???"; + } } } return attributes;