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

AttributeError: 'LDAPConnector' object has no attribute '_con' #115

Open
lucaspottersky opened this issue Oct 10, 2022 · 2 comments
Open
Labels

Comments

@lucaspottersky
Copy link

I'm trying to integrate pas.plugins.ldap with a Plone local environment, but it is throwing an exception when I open the control panel (http://plone.localhost:8080/Plone/plone_ldapcontrolpanel).

#docker-compose.yml

version: "3"
services:

  webserver:
    image: nginx
    volumes:
      - ./default.conf:/etc/nginx/conf.d/default.conf
    depends_on:
      - backend
      - frontend
    ports:
    - "80:80"

  frontend:
    image: plone/plone-frontend:16.0.0-alpha.42
    environment:
      RAZZLE_INTERNAL_API_PATH: http://backend:8080/Plone
    ports:
    - "3000:3000"
    depends_on:
      - backend

  backend:
    image: plone/plone-backend:6.0.0b3
    environment:
      SITE: Plone
      ADDONS: pas.plugins.ldap==1.8.1
    ports:
    - "8080:8080"
2022-10-10 16:17:31 ERROR [pas.plugins.ldap:217][waitress-0] Non-LDAP error while connection test!
Traceback (most recent call last):
  File "/app/lib/python3.9/site-packages/pas/plugins/ldap/properties.py", line 211, in connection_test
    ugm.users
  File "/app/lib/python3.9/site-packages/node/ext/ldap/ugm/_api.py", line 1113, in users
    return self['users']
  File "/app/lib/python3.9/site-packages/node/locking.py", line 30, in _locktree_decorator
    result = fn(self, *args, **kwargs)
  File "/app/lib/python3.9/site-packages/node/ext/ldap/ugm/_api.py", line 1081, in __getitem__
    self['users'] = Users(self.props, self.ucfg)
  File "/app/lib/python3.9/site-packages/node/ext/ldap/ugm/_api.py", line 472, in __init__
    context = LDAPNode(name=cfg.baseDN, props=props)
  File "/app/lib/python3.9/site-packages/plumber/instructions.py", line 453, in entrance
    return plumbing_method(next_, self, *args, **kw)
  File "/app/lib/python3.9/site-packages/node/behaviors/lifecycle.py", line 48, in __init__
    next_(self, *args, **kw)
  File "/app/lib/python3.9/site-packages/node/ext/ldap/_node.py", line 199, in __init__
    self._ldap_session = LDAPSession(props)
  File "/app/lib/python3.9/site-packages/node/ext/ldap/session.py", line 15, in __init__
    connector = LDAPConnector(props=props)
  File "/app/lib/python3.9/site-packages/node/ext/ldap/base.py", line 108, in __init__
    self._conn_timeout = props.conn_timeout
AttributeError: 'LDAPProps' object has no attribute 'conn_timeout'
Exception ignored in: <function LDAPConnector.__del__ at 0x7f7d23f8e820>
Traceback (most recent call last):
  File "/app/lib/python3.9/site-packages/node/ext/ldap/base.py", line 155, in __del__
    self.unbind()
  File "/app/lib/python3.9/site-packages/node/ext/ldap/base.py", line 146, in unbind
    if self._con is None:
AttributeError: 'LDAPConnector' object has no attribute '_con'

@mamico
Copy link
Contributor

mamico commented Oct 19, 2022

@lucaspottersky
Try to pin node and node.ext.ldap to previous version, ie

ADDONS: pas.plugins.ldap==1.8.1 node==1.0 node.ext.ldap==1.0

@jensens
Copy link
Member

jensens commented Oct 19, 2022

Indeed. We need to follow up with changes in node.ext.ldap. Pull requests are welcome. At the moment I have no time to fix this myself.

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

No branches or pull requests

3 participants