Trouble with setting admin user

259 views
Skip to first unread message

Brian Novogradac

unread,
Aug 30, 2016, 9:54:25 AM8/30/16
to Project Jupyter
I've modified the jupyterhub_config.py file to add a user as an admin but its not working.  I am using the Authenticator config below.  

# If unspecified, only the user that launches the server will be admin.
c.Authenticator.admin_users = set(useronsystem)


when i add the user id in the set area, jupyterhub fails to start and i get teh  No admin users, admin interface will be unavailable.
then it gives an erro for every character in the user id:

[E 2016-08-30 09:53:28.221 JupyterHub app:864] Error adding user 'o' already in db
    Traceback (most recent call last):
      File "/opt/jupyterhub/jupyterhub/app.py", line 859, in init_users
        yield gen.maybe_future(self.authenticator.add_user(user))
      File "/opt/jupyterhub/jupyterhub/auth.py", line 328, in add_user
        raise KeyError("User %s does not exist." % user.name)
    KeyError: 'User o does not exist.'


I'm stumped


Brian

MinRK

unread,
Aug 31, 2016, 4:53:37 AM8/31/16
to Project Jupyter

You want set(['user']) not set('user'). If you pass a single list to set, you get each character as an item in the set, not a single item:

In [1]: set('user')
Out[1]: {'e', 'r', 's', 'u'}

In [2]: set(['user'])
Out[2]: {'user'}

-MinRK


--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/5296b0a2-80d2-497a-abc3-fe7b6331c25f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages