This is not an `AttributeError` by any means (error in trying to access an attribute on an object). `AttributeErrors` often get handled in special way, particularly by Zope (Acquisition), so chances are raising one triggers some unexcpected behavior. I would tend to say this might be a `ValueError`, but lets just make it a generic `Exception` with a custom message.