Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: too many values to unpack when requesting 'groups' #68

Open
gnafou opened this issue May 24, 2022 · 4 comments
Open

ValueError: too many values to unpack when requesting 'groups' #68

gnafou opened this issue May 24, 2022 · 4 comments

Comments

@gnafou
Copy link

gnafou commented May 24, 2022

Hello

I have the following error

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 371, in publish_module
  Module ZPublisher.WSGIPublisher, line 274, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 63, in call_object
  Module Products.CMFPlone.controlpanel.browser.usergroups_groupsoverview, line 35, in __call__
  Module Products.CMFPlone.controlpanel.browser.usergroups_groupsoverview, line 57, in doSearch
  Module Products.PlonePAS.pas, line 244, in getGroupById
  Module Products.PlonePAS.tools.groups, line 223, in getGroupById
  Module Products.PlonePAS.pas, line 229, in getGroup
  Module pas.plugins.ldap.plugin, line 679, in getGroupById
  Module node.behaviors.mapping, line 83, in keys
  Module node.behaviors.mapping, line 83, in 
  Module node.ext.ldap.ugm._api, line 563, in __iter__
  Module node.ext.ldap._node, line 573, in batched_search
ValueError: too many values to unpack (expected 2)

when i try to get the groups from within a plone5.2 instance.

The ldap directory is a meta ldap

> Survol de cette version
> 
>     Plone 5.2.6 (5214)
>     CMF 2.5.4
>     Zope 4.6.3
>     Python 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]
>     PIL 6.2.2 (Pillow)
>     WSGI : Activé
>     Serveur : waitress 1.4.4
@gnafou
Copy link
Author

gnafou commented May 24, 2022

the ldap tree may be complex

ROOT TREE = dc=aaa,dc=fr

META is so that
the groups will be located in
cn=group_cn0,ou=Group,dc=XX,dc=aaa,dc=fr
cn=group_cn1,ou=Group,dc=YY,dc=aaa,dc=fr

@rnixx
Copy link
Member

rnixx commented May 24, 2022

Hi,

can you please add a breakpoint here https://github.com/conestack/node.ext.ldap/blob/master/src/node/ext/ldap/_node.py#L573 and have a look what search_func actually is and what it returns?

@gnafou
Copy link
Author

gnafou commented May 24, 2022

Hello,

search_func is '<bound method debug..wrapped of <dc=em-ldap,dc=fr - False>>'
search_func(kw) leads to the error "* ValueError: too many values to unpack (expected 2)"
kw is "{'attrlist': ['rdn', 'cn'], 'page_size': 30, 'cookie': None}"

@rnixx
Copy link
Member

rnixx commented May 25, 2022

Have you called search_func(**kw) in debugger? Does the error happen in the search function or is the return value wrong? Can you please step into search function if the error happens there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants