Plone upgrade from 5.1 to Plone 5.2.4 - KeyError

I'm upgrading from Plone 5.1.0.1 to Plone 5.2.4.
I was successful in migrating form 5.1.0.1 to 5.1.7 (the latest stable 5.1.x)
After cleaning out all the ATContentTypes dependencies I'm now attempting to do a @@plone_upgrade to Plone 5.2.4.

I'm getting a KeyError. Here's my Traceback...

2021-03-08 15:52:21,424 INFO    [plone.app.upgrade:30][waitress-3] Added BooleanIndex for field exclude_from_nav.
2021-03-08 15:52:21,425 INFO    [plone.app.upgrade:32][waitress-3] Indexing new indexes exclude_from_nav.
2021-03-08 15:52:26,489 INFO    [plone.app.upgrade:395][waitress-3] Cleaned up the toolset registry.
2021-03-08 15:52:26,489 INFO    [plone.app.upgrade:57][waitress-3] Removing unused interface indexes from relations catalog.
2021-03-08 15:52:26,824 ERROR   [plone.app.upgrade:299][waitress-3] Upgrade aborted. Error:
Traceback (most recent call last):
  File "/home/ubuntu/buildout-cache/eggs/Products.CMFPlone-5.2.4-py2.7.egg/Products/CMFPlone/MigrationTool.py", line 292, in upgrade
    step['step'].doStep(setup)
  File "/home/ubuntu/buildout-cache/eggs/Products.GenericSetup-2.1.1-py2.7.egg/Products/GenericSetup/upgrade.py", line 168, in doStep
    self.handler(tool)
  File "/home/ubuntu/buildout-cache/eggs/plone.app.upgrade-2.0.38-py2.7.egg/plone/app/upgrade/v52/betas.py", line 143, in to52beta1
    remove_interface_indexes_from_relations_catalog()
  File "/home/ubuntu/buildout-cache/eggs/plone.app.upgrade-2.0.38-py2.7.egg/plone/app/upgrade/v52/betas.py", line 81, in remove_interface_indexes_from_relations_catalog
    catalog.unindex_doc(token)
  File "/home/ubuntu/buildout-cache/eggs/zc.relation-1.1.post2-py2.7.egg/zc/relation/catalog.py", line 571, in unindex_doc
    (relToken, value_index_info['name']))
KeyError: (734036681, 'from_attribute')
2021-03-08 15:52:26,834 INFO    [plone.app.upgrade:308][waitress-3] End of upgrade path, main migration has finished.
2021-03-08 15:52:26,836 ERROR   [plone.app.upgrade:311][waitress-3] The upgrade path did NOT reach current version.
2021-03-08 15:52:26,837 ERROR   [plone.app.upgrade:312][waitress-3] Migration has failed

I once ran into a KeyError from_object - this below helped me at the time (looking further in a minute to hopefully remember the exact issue).

Edit/add Sorry all I found was this:

        # 20200625 Workaround for "KeyError: 'from_object' "
        # when creating or modifying a Produkte dexterity object
        try:
            self._from_id = intids.register(self.__dict__['from_object'])
            return _object(self._from_id)

        except KeyError:
            log.info('%s Broken relation value to: %s' %(get_linenumber(), self.to_path))
            return None

Maybe check your relations for consistency before attempting the migration?
This may help: GitHub - collective/collective.relationhelpers: Helpers to manage, create, export and rebuild relations in Plone

Edit2 - also check:
https://training.plone.org/5/mastering-plone/relations.html#relationvalues

Were you able to fix this?

@mtrebon,
Thanks for checking in. Not yet.
We've delayed the migration to 5.2 while working on integrating Volto on 5.1.
I will eventually need to face it, but need to ship some value for the project in the meantime.

In the meantime, I don't know if a badly stored datetime is related, but I'm getting issues rebuilding the catalog. It consistently interrupts a rebuild with this error:

SyntaxError("Unable to parse ((DateTime('2020/12/01 11:55:00 UTC'),),), {}",) (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: Unable to parse ((DateTime('2020/12/01 11:55:00 UTC'),),), {})

Plone Foundation Code of Conduct