jupyterhub-deploy-docker icon indicating copy to clipboard operation
jupyterhub-deploy-docker copied to clipboard

TypeError: 'LazyConfigValue' object is not iterable

Open NaamaNaa opened this issue 7 years ago • 0 comments

I tried to run jupyterHub with docker. Eveything was working fine ( jupyterHub + authentication) until I tried to set up the spawning process :

[E 2018-03-01 09:42:00.213 JupyterHub app:1710] Traceback (most recent call last): File "/opt/conda/lib/python3.5/site-packages/jupyterhub/app.py", line 1707, in launch_instance_async yield self.initialize(argv) File "/opt/conda/lib/python3.5/types.py", line 199, in __next__ return next(self.__wrapped) File "/opt/conda/lib/python3.5/site-packages/jupyterhub/app.py", line 1447, in initialize self.load_config_file(self.config_file) File "<decorator-gen-5>", line 2, in load_config_file File "/opt/conda/lib/python3.5/site-packages/traitlets/config/application.py", line 87, in catch_config_error return method(app, *args, **kwargs) File "/opt/conda/lib/python3.5/site-packages/traitlets/config/application.py", line 598, in load_config_file raise_config_file_errors=self.raise_config_file_errors, File "/opt/conda/lib/python3.5/site-packages/traitlets/config/application.py", line 580, in _load_config_files collisions = earlier_config.collisions(config) File "/opt/conda/lib/python3.5/site-packages/traitlets/config/loader.py", line 212, in collisions for key in mine: TypeError: 'LazyConfigValue' object is not iterable

Here is my jupyterhub_config.py :

#import dummyauthenticator
#from jupyterhub.auth import Authenticator
#from jupyter_client.localinterfaces import public_ips
from dockerspawner import DockerSpawner
import os
#import netifaces
c = get_config()

# setting the image used to spawn notebooks
#c.DockerSpawner.container_image = 'jupyter/minimal-notebook'
c.DockerSpawner.container_image = os.environ['DOCKER_NOTEBOOK_IMAGE']

# setting jupyterhub options : port , ip
c.JupyterHub.hub_ip = '0.0.0.0'
#c.JupyterHub.hub_port = 8080
#c.JupyterHub.port = 8000

# managing the authentication
c.JupyterHub.authenticator_class = 'dummyauthenticator.DummyAuthenticator'
c.dummyauthenticator.password = 'toto'

# managing the spawning of notebooks
c.JupyterHub.spawner_class = DockerSpawner
c.DockerSpawner.container_image = os.environ['DOCKER_NOTEBOOK_IMAGE']

c.DockerSpawner.host_ip = '10.0.2.15'
#c.DockerSpawner.use_internal_ip = True
c.DockerSpawner.remove_containers = True

and the docker-compose.yml :





version: "2"
services:
  hub:
    restart: always
    image: naama:latest
    container_name: jupyterhub
    ports:
       - "8000:8000"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:rw"
    environment:
      DOCKER_NOTEBOOK_DIR: "C:/docker4wl/docker4wl-workspace/notebook"
      DOCKER_NOTEBOOK_IMAGE: 'jupyter/minimal-notebook:latest'

Here is also a link to someone who had to deal with a similar error : issue note : I followed @minrk tutorial on youtube :)

NaamaNaa avatar Mar 01 '18 10:03 NaamaNaa