KeyError: 'plone.staticresources.upgrades:1006'

Anyone seen this Plone 5.2.1 -> 5.2.2 upgrade issue?

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 359, in publish_module
  Module ZPublisher.WSGIPublisher, line 262, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 63, in call_object
  Module Products.CMFPlone.browser.admin, line 310, in __call__
  Module <string>, line 3, in upgrade
  Module AccessControl.requestmethod, line 88, in _curried
  Module Products.CMFPlone.MigrationTool, line 315, in upgrade
  Module Products.CMFPlone.MigrationTool, line 84, in upgrade_all
  Module Products.GenericSetup.tool, line 1156, in upgradeProfile
  Module Products.GenericSetup.upgrade, line 203, in doStep
  Module Products.GenericSetup.tool, line 396, in runAllImportStepsFromProfile
   - __traceback_info__: profile-plone.staticresources.upgrades:1006
  Module Products.GenericSetup.tool, line 1448, in _runImportStepsFromContext
  Module Products.GenericSetup.tool, line 1195, in _getImportContext
  Module Products.GenericSetup.registry, line 701, in getProfileInfo
KeyError: 'plone.staticresources.upgrades:1006'

No, have not seen this.
In a 5.2.2 site I went to portal_setup, found Products.CMFPlone:plone, show old upgrades, select an upgrade to go to version 5208. This should give the same situation as if the database was still on 5.2.1. Then I ran @@plone-upgrade and it went fine.

Do you have plone.staticresources 1.3.2?

But... the profile plone.staticresources.upgrades:1006 from your traceback does not exist. Where does it come from?

Halfway through the traceback, this code from the MigrationTool is executed. It installs a profile from the add-on list. This list contains plone.staticresources:default. It does not contain a number 1006.

Can you grep in the code to see if any package changes something in ADDON_LIST?

Re-running the migration on the same system without any changes now worked :grimacing:

1 Like

I just got the same error trying to update 5.2.2 (py3) to 5.2.3 from Plone Site Setup. To workaround this, I did the upgrade from:

portal_setup > Upgrade > Products.CMFPlone:plone

The update was from 5209-5210.

The control panel is no longer showing the upgrade message.

Update: Just noticed that in the upgrades tab in portal_setup, plone.staticresources:default is still listed. If I click on the "Choose Profile" button, the page says p.staticresources: default is currently in version 10 and the filesystem version is at 12. The available upgrades show:

Update bundles (10-11)
Register pat-datetime-picker (1005-1006)

Update2: There was an upgrade bug introduced in plone.patternslib version 1.2.0. This was resolved by commit https://github.com/plone/plone.patternslib/commit/1968e5185d0d15f8f39feda7289e38f572f02ac0 and in release 1.2.1

Plone Foundation Code of Conduct