Hi,
We’re trying to use peak.assignDimensions feeding it a list of axis codes and a list of nmrAtoms as their PIDs as strings which it claims to handle. We’re getting errors like
File /local/u8/usrlocal/ccpnmr3.2.0/src/python/ccpn/core/Peak.py:909, in Peak.assignDimensions(self, axisCodes, values)
906 for axis, value in zip(axisCodes, values):
907 # isotopeCode. if not defined, assign to the nmrAtoms from the spectrum isotopeCodes
908 for na in value:
--> 909 if na.isotopeCode in [UnknownIsotopeCode, self._UNKNOWN_VALUE_STRING, None]:
910 try:
911 isotopeCodes = self.spectrum.getByAxisCodes('isotopeCodes', [specAxisCodes.index(axis)])
AttributeError: 'str' object has no attribute 'isotopeCode'
We think this may be because although the method checks for strings, sequences or plain nmrAtoms it stores these in dimensionNmrAtoms and uses them to set the assignments via the self.dimensionNmrAtoms call but then doesn’t use them in the isotopeCode setting loop because it goes back to the “values” passed as input.
Is the Isotope checking loop even needed?