Possible Problems with CCPN v1 to v2 Data Upgrade Form

1. Missing ChemCompVars

Some of the ChemCompVars have changed between v1 and v2. This could result in an error message like:
Job failed: AttributeError: 'NoneType' object has no attribute 'isParamagnetic'
  File "/data/ccpn/www/cgi-bin/upgrade/upgrade", line 575, in convertMajorProject
    doMajorConvert(dataStem)
  File "/data/ccpn/www/cgi-bin/upgrade/upgrade", line 549, in doMajorConvert
    p = Converters.doMajorUpgradeToCurrent(oldPath, oldTag, newDir=newDir)
  File "/data/ccpn/upgrade/cvsroot_branch_2_0_3/ccpn/python/memops/format/compatibility/Converters.py", line 76, in doMajorUpgradeToCurrent
    globalMapping=globalMapping, oldTags=oldTags)
  File "/data/ccpn/upgrade/cvsroot_branch_2_0_3/ccpn/python/memops/format/compatibility/part1/Converters1.py", line 95, in majorUpgradeToCurrent
    return upgrader.majorUpgrade(doSave=doSave)
  File "/data/ccpn/upgrade/cvsroot_branch_2_0_3/ccpn/python/memops/format/compatibility/part1/Converters1.py", line 215, in majorUpgrade
    newRoot.checkAllValid(complete=True)
  File "/data/ccpn/upgrade/cvsroot_branch_2_0_3/ccpn/python/memops/api/Implementation.py", line 5263, in checkAllValid
    value.checkAllValid(complete)
  File "/data/ccpn/upgrade/cvsroot_branch_2_0_3/ccpn/python/ccp/api/molecule/MolSystem.py", line 8915, in checkAllValid

    self.checkValid(complete)
  File "/data/ccpn/upgrade/cvsroot_branch_2_0_3/ccpn/python/ccp/api/molecule/MolSystem.py", line 9177, in checkValid
    value = self.getIsParamagnetic()
  File "/data/ccpn/upgrade/cvsroot_branch_2_0_3/ccpn/python/ccp/api/molecule/MolSystem.py", line 11875, in getIsParamagnetic
    if residue.chemCompVar.isParamagnetic:
          

2. Redundant DistanceContraintItems

In v1 the resonances of a DistanceConstraintItem were an ordered list (with two elements). This meant once could have two DistanceConstraintItems both with the same resonances, just listed backwards. In v2 this is not allowed. This will produce an error like:
Job failed: ApiError: Cannot add child - key already in use:
ccp.nmr.NmrConstraint.DistanceConstraintItem:<ccp.nmr.NmrConstraint.DistanceConstraint [1, 1, 1026]>:frozenset([<ccp.nmr.NmrConstraint.FixedResonance [1, 2]>,
<ccp.nmr.NmrConstraint.FixedResonance [1, 4]>])
  File "/data/ccpn/www/cgi-bin/upgrade/upgrade", line 575, in convertMajorProject
    doMajorConvert(dataStem)
  File "/data/ccpn/www/cgi-bin/upgrade/upgrade", line 549, in doMajorConvert
    p = Converters.doMajorUpgradeToCurrent(oldPath, oldTag, newDir=newDir)
  File "/data/ccpn/upgrade/cvsroot_branch_2_0_3/ccpn/python/memops/format/compatibility/Converters.py",
line 76, in doMajorUpgradeToCurrent
    globalMapping=globalMapping, oldTags=oldTags)
  File "/data/ccpn/upgrade/cvsroot_branch_2_0_3/ccpn/python/memops/format/compatibility/part1/Converters1.py", line 95, in majorUpgradeToCurrent
    return upgrader.majorUpgrade(doSave=doSave)
  File "/data/ccpn/upgrade/cvsroot_branch_2_0_3/ccpn/python/memops/format/compatibility/part1/Converters1.py", line 204, in majorUpgrade
    self.transferData()
  File "/data/ccpn/upgrade/cvsroot_branch_2_0_3/ccpn/python/memops/format/compatibility/part1/Converters1.py", line 618, in transferData
    oldVersionStr=self.oldVersionStr)
  File "/data/ccpn/upgrade/cvsroot_branch_2_0_3/ccpn/python/memops/general/Util.py", line 1008, in transferData
    linkTopToParent=True)
  File "/data/ccpn/upgrade/cvsroot_branch_2_0_3/ccpn/python/memops/xml/Implementation.py", line 4750, in linkChildData
    + ": %s:%s:%s" % (obj.getQualifiedName(), obj.getParent(), key)
          
If you see this error then run the script deleteRedundantConstraintItems.py on the v1 project. So, for example, from inside Analysis do:
>>> from deleteRedundantConstraintItems import deleteRedundantConstraintItems
>>> deleteRedundantConstraintItems(top.project)
          
or from outside Analysis do:
>>> python deleteRedundantConstraintItems.py PROJECT_FILE
          
where PROJECT_FILE is the top-level Analysis v1 project file.