Setting Authenticator and Spawner classes

582 views
Skip to first unread message

Spencer Ogden

unread,
Mar 21, 2017, 4:00:53 PM3/21/17
to Project Jupyter
I am trying to setup of jupyterhub testing environment on RHEL 6. I have compiled Python3.6 from source, created a virtualenv and used pip to install the latest jupyterhub packages:

pip install jupyter jupyterhub jupyterhub-dummyauthenticator jupyterhub-simplespawner

Using a barebones config file: jupyterhub_config.py:
c.JupyterHub.spawner_class = 'simplespawner.SimpleLocalProcessSpawner'
c.JupyterHub.authenticator_class = 'dummyauthenticator.DummyAuthenticator'

I get the following error:
$ jupyterhub
[snip out help information]
[C 2017-03-21 12:52:00.230 JupyterHub application:91] The 'authenticator_class' trait of <jupyterhub.app.JupyterHub object at 0x7fba6ec06898> instance must be a type, but 'dummyauthenticator.DummyAuthenticator' could not be imported

I can import the module in a python session (and it is show that it imports from the virtualenv):
$ python
Python 3.6.0 (default, Mar 21 2017, 08:57:23)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dummyauthenticator
>>> dummyauthenticator.__file__
'/home/portcon/.envs/kate/lib/python3.6/site-packages/dummyauthenticator/__init__.py'

Is there a change in the config layout for these parameters in the latest version?

Thanks,
Spencer

Yuvi Panda

unread,
Mar 21, 2017, 4:22:16 PM3/21/17
to Project Jupyter
heya!

Can you do a `which jupyterhub` to make sure that jupyterhub and the
dummyauthenticator are installed into the same environment?

Also can you paste the output of 'pip list'?

Thank you!
> --
> 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+u...@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/b918704e-479d-4bae-909a-51d0594770e2%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Yuvi Panda T
http://yuvi.in/blog

Spencer Ogden

unread,
Mar 21, 2017, 6:31:28 PM3/21/17
to Project Jupyter, yuvi...@gmail.com
You bet


On Tuesday, March 21, 2017 at 4:22:16 PM UTC-4, Yuvi Panda wrote:
Can you do a `which jupyterhub` to make sure that jupyterhub and the
dummyauthenticator are installed into the same environment?

 $ which jupyterhub
~/.envs/kate/bin/jupyterhub
 
Also can you paste the output of 'pip list'? 

$ pip list
alembic (0.9.1)
appdirs (1.4.3)
bleach (2.0.0)
decorator (4.0.11)
docker-py (1.10.6)
docker-pycreds (0.2.1)
dockerspawner (0.7.0)
entrypoints (0.2.2)
escapism (0.0.1)
html5lib (0.999999999)
ipykernel (4.5.2)
ipython (5.3.0)
ipython-genutils (0.2.0)
ipywidgets (6.0.0)
Jinja2 (2.9.5)
jsonschema (2.6.0)
jupyter (1.0.0)
jupyter-client (5.0.0)
jupyter-console (5.1.0)
jupyter-core (4.3.0)
jupyterhub (0.7.2)
jupyterhub-dummyauthenticator (0.1)
jupyterhub-simplespawner (0.1)
Mako (1.0.6)
MarkupSafe (1.0)
mistune (0.7.4)
nbconvert (5.1.1)
nbformat (4.3.0)
notebook (4.4.1)
packaging (16.8)
pamela (0.3.0)
pandocfilters (1.4.1)
pexpect (4.2.1)
pickleshare (0.7.4)
pip (9.0.1)
prompt-toolkit (1.0.13)
ptyprocess (0.5.1)
Pygments (2.2.0)
pyparsing (2.2.0)
python-dateutil (2.6.0)
python-editor (1.0.3)
pyzmq (16.0.2)
qtconsole (4.2.1)
requests (2.13.0)
setuptools (34.3.2)
simplegeneric (0.8.1)
six (1.10.0)
SQLAlchemy (1.1.6)
terminado (0.6)
testpath (0.3)
tornado (4.4.2)
traitlets (4.3.2)
wcwidth (0.1.7)
webencodings (0.5)
websocket-client (0.40.0)
wheel (0.29.0)
widgetsnbextension (2.0.0)

 

MinRK

unread,
Mar 22, 2017, 11:37:27 AM3/22/17
to Project Jupyter

Can you import the authenticator in the config file?

from dummyauthenticator import DummyAuthenticator
c.JupyterHub.authenticator_class = DummyAuthenticator

usually when things behave differently, it’s an env/PATH issue, so you might start dumping sys.path to be sure it’s what you expect.

-Min


--
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.

Spencer Ogden

unread,
Mar 24, 2017, 10:27:32 AM3/24/17
to Project Jupyter
On Wednesday, March 22, 2017 at 11:37:27 AM UTC-4, Min RK wrote:

Can you import the authenticator in the config file?

from dummyauthenticator import DummyAuthenticator
c.JupyterHub.authenticator_class = DummyAuthenticator
Hi Min,

This construction worked. Thanks very much,

Spencer

MinRK

unread,
Mar 24, 2017, 11:29:18 AM3/24/17
to Project Jupyter
Super weird! There wasn't a typo in the string, or anything?

--
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.
Reply all
Reply to author
Forward
0 new messages