@@ -1802,6 +1802,8 @@ class _AssemblyChecker:
18021802 def __init__ (self ):
18031803 # Map from Assembly id to set of Asym ids
18041804 self ._asmb_asyms = {}
1805+ # Map from Assembly id to Assembly object
1806+ self ._asmb_from_id = {}
18051807
18061808 # Map from Assembly id to set of all represented Asym ids (in models)
18071809 self ._asmb_model_asyms = {}
@@ -1812,6 +1814,7 @@ def add_model_asyms(self, model, seen_asym_ids):
18121814 # If this is the first time we've seen this assembly, get its
18131815 # declared set of asym IDs
18141816 if id (asmb ) not in self ._asmb_asyms :
1817+ self ._asmb_from_id [id (asmb )] = asmb
18151818 asyms = frozenset (x ._id for x in asmb if hasattr (x , 'entity' ))
18161819 self ._asmb_asyms [id (asmb )] = asyms
18171820 # Add asym IDs from model
@@ -1827,9 +1830,12 @@ def get_extra_asyms():
18271830 for asmb_id , asyms in self ._asmb_asyms .items ():
18281831 extra = asyms - self ._asmb_model_asyms [asmb_id ]
18291832 if extra :
1833+ asmb = self ._asmb_from_id [asmb_id ]
1834+ asmb_id = ("ID %s" % asmb ._id
1835+ if hasattr (asmb , '_id' ) else asmb )
18301836 yield asmb_id , ", " .join (sorted (extra ))
18311837
1832- err = "; " .join ("assembly ID %s, asym IDs %s" % extra
1838+ err = "; " .join ("%s, asym IDs %s" % extra
18331839 for extra in get_extra_asyms ())
18341840 if err :
18351841 raise ValueError (
0 commit comments