diff --git a/src/Mod/Show/Containers.py b/src/Mod/Show/Containers.py index 3076a657d2..29fea509ba 100644 --- a/src/Mod/Show/Containers.py +++ b/src/Mod/Show/Containers.py @@ -255,7 +255,7 @@ def VisGroupChain(feat): class ContainerError(RuntimeError): pass class NotAContainerError(ContainerError): - def __init__(self): - ContainerError.__init__(self, u"{obj} is not recognized as container".format(obj.Name)) + def __init__(self, name="None"): + ContainerError.__init__(self, "'{}' is not recognized as container".format(name)) class ContainerTreeError(ContainerError): pass