Skip to content

Commit

Permalink
Merge pull request #991 from alicevision/dev/avoidLoadError
Browse files Browse the repository at this point in the history
[core] avoid error during project load
  • Loading branch information
fabiencastan authored Jul 19, 2020
2 parents 746e739 + c02267b commit 6af41e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion meshroom/core/attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import re
import weakref
import types
import logging

from meshroom.common import BaseObject, Property, Variant, Signal, ListModel, DictModel, Slot
from meshroom.core import desc, pyCompatibility, hashValue
Expand Down Expand Up @@ -190,7 +191,10 @@ def _applyExpr(self):
# value is a link to another attribute
link = v[1:-1]
linkNode, linkAttr = link.split('.')
g.addEdge(g.node(linkNode).attribute(linkAttr), self)
try:
g.addEdge(g.node(linkNode).attribute(linkAttr), self)
except KeyError as err:
logging.warning('Connect Attribute from Expression failed.\nExpression: "{exp}"\nError: "{err}".'.format(exp=v, err=err))
self.resetValue()

def getExportValue(self):
Expand Down

0 comments on commit 6af41e3

Please sign in to comment.