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

NameError: name 'LDAPAuthenticator' is not defined #15

Closed
benhosmer opened this issue Aug 18, 2016 · 2 comments
Closed

NameError: name 'LDAPAuthenticator' is not defined #15

benhosmer opened this issue Aug 18, 2016 · 2 comments

Comments

@benhosmer
Copy link

        exec(compiler(f.read(), fname, 'exec'), glob, loc)
      File "/home/vagrant/jupyterhub_config.py", line 6, in <module>
        LDAPAuthenticator.server_address = 'https://my.ldap.server'
    NameError: name 'LDAPAuthenticator' is not defined

My config:

c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator'
LDAPAuthenticator.server_address = 'https://my.ldap.server'
LDAPAuthenticator.bind_dn_template = 'uid={username},ou=people,dc=SOMEDC,dc=COM'

Adding this to my config:

from ldapauthenticator import LDAPAuthenticator

fixes the error. Am I missing something or do the docs just need to be updated?

@yuvipanda
Copy link
Collaborator

Hello!

I think you need to make it be:

c.LDAPAuthenticator.server_address = 'https://my.ldap.server'

Note the preceeding c., which represents the config object. I checked and the README includes the 'c', but realize that's easy to miss. I'll add a comment emphasizing it.

yuvipanda added a commit that referenced this issue Aug 18, 2016
@benhosmer
Copy link
Author

Yep, you're right. It was a copy/paste error!

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