diff --git a/pype/plugins/maya/publish/collect_look.py b/pype/plugins/maya/publish/collect_look.py index 6dc66711dac..7df85e4ba7a 100644 --- a/pype/plugins/maya/publish/collect_look.py +++ b/pype/plugins/maya/publish/collect_look.py @@ -277,7 +277,13 @@ def collect(self, instance): if looksets: for look in looksets: for at in shaderAttrs: - con = cmds.listConnections("{}.{}".format(look, at)) + try: + con = cmds.listConnections("{}.{}".format(look, at)) + except ValueError: + # skip attributes that are invalid in current + # context. For example in the case where + # Arnold is not enabled. + continue if con: materials.extend(con)