diff --git a/src/App/ObjectIdentifier.cpp b/src/App/ObjectIdentifier.cpp index 65a5cd425e..6914439317 100644 --- a/src/App/ObjectIdentifier.cpp +++ b/src/App/ObjectIdentifier.cpp @@ -600,6 +600,8 @@ size_t ObjectIdentifier::Component::getIndex(size_t count) const { Py::Object ObjectIdentifier::Component::get(const Py::Object &pyobj) const { Py::Object res; if(isSimple()) { + if(!pyobj.hasAttr(getName())) + FC_THROWM(Base::AttributeError, "No attribute named '" << getName() << "'"); res = pyobj.getAttr(getName()); } else if(isArray()) { if(pyobj.isMapping())