DockerSpawner template_namespace
See original GitHub issue[I 2019-03-03 06:25:03.970 JupyterHub app:1673] Using Authenticator: oauthenticator.gitlab.GitLabOAuthenticator-0.8.1
[I 2019-03-03 06:25:03.971 JupyterHub app:1673] Using Spawner: dockerspawner.dockerspawner.DockerSpawner-0.11.0
[E 2019-03-03 06:25:30.635 JupyterHub pages:148] Failed to spawn single-user server with form
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/handlers/pages.py", line 146, in post
await self.spawn_single_user(user, options=options)
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/handlers/base.py", line 705, in spawn_single_user
timedelta(seconds=self.slow_spawn_timeout), finish_spawn_future
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/handlers/base.py", line 626, in finish_user_spawn
await spawn_future
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/user.py", line 489, in spawn
raise e
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/user.py", line 409, in spawn
url = await gen.with_timeout(timedelta(seconds=spawner.start_timeout), f)
File "/opt/conda/lib/python3.6/site-packages/dockerspawner/dockerspawner.py", line 984, in start
obj = yield self.create_object()
File "/opt/conda/lib/python3.6/site-packages/dockerspawner/dockerspawner.py", line 852, in create_object
command=(yield self.get_command()),
File "/opt/conda/lib/python3.6/site-packages/dockerspawner/dockerspawner.py", line 812, in get_command
return cmd + self.get_args()
File "/opt/conda/lib/python3.6/site-packages/dockerspawner/dockerspawner.py", line 726, in get_args
args = super().get_args()
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/spawner.py", line 700, in get_args
notebook_dir = self.format_string(self.notebook_dir)
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/spawner.py", line 681, in format_string
return s.format(**self.template_namespace())
TypeError: 'dict' object is not callable
the template_namespace
is overwritten as a property
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top Results From Across the Web
DockerSpawner API - Read the Docs
Return the template namespace for format-string formatting. Currently used on default_url and notebook_dir. Subclasses may add items to the available ...
Read more >Release 12.1.0 Jupyter Contributors - DockerSpawner
template_namespace(). Return the template namespace for format-string formatting. Currently used on default_url and notebook_dir. Subclasses may ...
Read more >Release 12.1.0.dev0 Jupyter Contributors - DockerSpawner
template_namespace(). Return the template namespace for format-string formatting. Currently used on default_url and notebook_dir. Subclasses may ...
Read more >DockerSpawner
The dockerspawner (also known as JupyterHub Docker Spawner), enables JupyterHub to spawn single user notebook servers in Docker containers.
Read more >jupyterhub/dockerspawner - GitHub
The dockerspawner (also known as JupyterHub Docker Spawner), enables JupyterHub to spawn single user notebook servers in Docker containers.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same issue here! RUN pip install dockerspawner==0.10.0 inside my Dockerfile as a temporary solutino
in https://github.com/jupyterhub/jupyterhub/blob/0.9.6/jupyterhub/spawner.py#L699 and forward, the code checks if the configuration values for
notebook_dir
ordefault_url
are set. If either is the case, it will calls.format
as a method, when it at runtime is adict
type. Having eitherc.Spawner.default_url
orc.DockerSpawner.notebook_dir
in yourjupyterhub_config.py
will trigger this error.