collective / pas.plugins.ldap

Zope (and Plone) PAS Plugin providing users and groups from LDAP directory
http://pypi.python.org/pypi/pas.plugins.ldap
Other
13 stars 20 forks source link

pas.plugins.ldap failed migration after upgrade plone 5.15 to 5.2.1 #90

Closed om1221 closed 4 years ago

om1221 commented 4 years ago

Dry run /@@plone-upgrade

Starting the migration from version: 5115
Ran upgrade step: Miscellaneous
Role / permission map imported.
Step pas.plugins.ldap.setup has an invalid import handler
Ran upgrade step: Miscellaneous
Role / permission map imported.
Adapters registered.
The object None was not found, while trying to register an utility. The provided object definition was portal_metadata. The site used was: <PloneSite at /mis>
The object None was not found, while trying to register an utility. The provided object definition was portal_syndication. The site used was: <PloneSite at /mis>
The object None was not found, while trying to register an utility. The provided object definition was portal_undo. The site used was: <PloneSite at /mis>
Utilities registered.
Skins tool imported.
Removed record plone.resources/jquery-highlightsearchterms.deps.
Removed record plone.resources/jquery-highlightsearchterms.url.
Removed record plone.resources/jquery-highlightsearchterms.js.
Removed record plone.resources/jquery-highlightsearchterms.init.
Removed record plone.resources/jquery-highlightsearchterms.export.
Removed record plone.resources/jquery-highlightsearchterms.conf.
Removed record plone.resources/jquery-highlightsearchterms.css.
Step pas.plugins.ldap.setup has an invalid import handler
Rebuilding member data information. This step can take a while if your site has many users.
Upgrade aborted. Error:
Traceback (most recent call last):
  File "/opt/plone/buildout-cache/eggs/Products.CMFPlone-5.2.1-py2.7.egg/Products/CMFPlone/MigrationTool.py", line 292, in upgrade
    step['step'].doStep(setup)
  File "/opt/plone/buildout-cache/eggs/Products.GenericSetup-2.0.1-py2.7.egg/Products/GenericSetup/upgrade.py", line 168, in doStep
    self.handler(tool)
  File "/opt/plone/buildout-cache/eggs/plone.app.upgrade-2.0.31-py2.7.egg/plone/app/upgrade/v52/alphas.py", line 94, in to52alpha1
    rebuild_memberdata(context)
  File "/opt/plone/buildout-cache/eggs/plone.app.upgrade-2.0.31-py2.7.egg/plone/app/upgrade/v52/alphas.py", line 49, in rebuild_memberdata
    for member in ms_tool.searchForMembers():
  File "/opt/plone/buildout-cache/eggs/Products.PlonePAS-6.0.5-py2.7.egg/Products/PlonePAS/tools/membership.py", line 248, in searchForMembers
    members = [getUserById(userid) for userid in uf_users]
  File "/opt/plone/buildout-cache/eggs/Products.PluggableAuthService-2.2.1-py2.7.egg/Products/PluggableAuthService/PluggableAuthService.py", line 233, in getUserById
    return self._findUser(plugins, user_info['id'], user_info['login'])
  File "/opt/plone/buildout-cache/eggs/Products.PluggableAuthService-2.2.1-py2.7.egg/Products/PluggableAuthService/PluggableAuthService.py", line 732, in _findUser
    data = propfinder.getPropertiesForUser(user, request)
  File "/opt/plone/buildout-cache/eggs/pas.plugins.ldap-1.6.1-py2.7.egg/pas/plugins/ldap/plugin.py", line 539, in getPropertiesForUser
    return LDAPUserPropertySheet(user_or_group, self)
  File "/opt/plone/buildout-cache/eggs/pas.plugins.ldap-1.6.1-py2.7.egg/pas/plugins/ldap/sheet.py", line 29, in __init__
    if self._ldapprincipal_id in plugin.users:
  File "/opt/plone/buildout-cache/eggs/node-0.9.23-py2.7.egg/node/behaviors/mapping.py", line 56, in __contains__
    self[key]
  File "/opt/plone/buildout-cache/eggs/plumber-1.5-py2.7.egg/plumber/instructions.py", line 390, in entrance
    return plumbing_method(_next, self, *args, **kw)
  File "/opt/plone/buildout-cache/eggs/node-0.9.23-py2.7.egg/node/behaviors/nodespace.py", line 39, in __getitem__
    return _next(self, key)
  File "/opt/plone/buildout-cache/eggs/node-0.9.23-py2.7.egg/node/locking.py", line 32, in _locktree_decorator
    result = fn(self, *args, **kwargs)
  File "/opt/plone/buildout-cache/eggs/node.ext.ldap-1.0b9-py2.7.egg/node/ext/ldap/ugm/_api.py", line 533, in __getitem__
    context = context[rdn]
  File "/opt/plone/buildout-cache/eggs/plumber-1.5-py2.7.egg/plumber/instructions.py", line 390, in entrance
    return plumbing_method(_next, self, *args, **kw)
  File "/opt/plone/buildout-cache/eggs/node-0.9.23-py2.7.egg/node/behaviors/nodespace.py", line 39, in __getitem__
    return _next(self, key)
  File "/opt/plone/buildout-cache/eggs/node.ext.ldap-1.0b9-py2.7.egg/node/ext/ldap/_node.py", line 229, in __getitem__
    attrlist=['']  # no need for attrs
  File "/opt/plone/buildout-cache/eggs/node.ext.ldap-1.0b9-py2.7.egg/node/ext/ldap/session.py", line 59, in search
    cookie
  File "/opt/plone/buildout-cache/eggs/node.ext.ldap-1.0b9-py2.7.egg/node/ext/ldap/base.py", line 240, in search
    key = '-'.join([str(_) for _ in key_items])
UnicodeEncodeError: 'ascii' codec can't encode character u'\u3000' in position 8: ordinal not in range(128)
End of upgrade path, main migration has finished.
The upgrade path did NOT reach current version.
Migration has failed
Dry run selected, transaction aborted
jensens commented 4 years ago

What are the versions of pas.plugins.ldap and dependencies used?

om1221 commented 4 years ago

pas.plugins.ldap = 1.6.1 thanks!

om1221 commented 4 years ago

Seems plone's issue