jupyterhub / wrapspawner

Mechanism for runtime configuration of spawners for JupyterHub
BSD 3-Clause "New" or "Revised" License
60 stars 57 forks source link

RecursionError: maximum recursion depth exceeded #38

Closed statiksof closed 4 years ago

statiksof commented 4 years ago

Hi, I am trying to provide two profiles (ProfilesSpawner and options form). Both forms are displayed but when spawning I get this:

Unhandled error starting  server: maximum recursion depth exceeded
[D 2020-02-10 10:59:09.089 JupyterHub user:739] Stopping 
[E 2020-02-10 10:59:09.114 JupyterHub user:652] Failed to cleanup  server that failed to start
    Traceback (most recent call last):
      File "/py36/lib/python3.6/site-packages/jupyterhub/user.py", line 646, in spawn
        await self.stop(spawner.name)
      File "/py36/lib/python3.6/site-packages/jupyterhub/user.py", line 743, in stop
        status = await spawner.poll()
      File "/site-packages/wrapspawner/wrapspawner.py", line 135, in poll
        return self.child_spawner.poll()
      File "/py36/lib/python3.6/site-packages/wrapspawner/wrapspawner.py", line 135, in poll
        return self.child_spawner.poll()
      File "/py36/lib/python3.6/site-packages/wrapspawner/wrapspawner.py", line 135, in poll
        return self.child_spawner.poll()
      [Previous line repeated 984 more times]
      File "/py36/lib/python3.6/site-packages/wrapspawner/wrapspawner.py", line 134, in poll
        if self.child_spawner:
      File "/py36/lib/python3.6/site-packages/traitlets/traitlets.py", line 556, in __get__
        return self.get(obj, cls)
    RecursionError: maximum recursion depth exceeded

[E 2020-02-10 10:59:09.137 JupyterHub pages:248] Failed to spawn single-user server with form
    Traceback (most recent call last):
      File "/py36/lib/python3.6/site-packages/jupyterhub/handlers/pages.py", line 245, in post
        await self.spawn_single_user(user, server_name=server_name, options=options)
      File "/py36/lib/python3.6/site-packages/jupyterhub/handlers/base.py", line 939, in spawn_single_user
        timedelta(seconds=self.slow_spawn_timeout), finish_spawn_future
      File "/py36/lib/python3.6/site-packages/jupyterhub/handlers/base.py", line 852, in finish_user_spawn
        await spawn_future
      File "/py36/lib/python3.6/site-packages/jupyterhub/user.py", line 656, in spawn
        raise e
      File "/py36/lib/python3.6/site-packages/jupyterhub/user.py", line 557, in spawn
        f = maybe_future(spawner.start())
      File "/py36/lib/python3.6/site-packages/wrapspawner/wrapspawner.py", line 125, in start
        return self.child_spawner.start()
      File "/py36/lib/python3.6/site-packages/wrapspawner/wrapspawner.py", line 125, in start
        return self.child_spawner.start()
      File "/py36/lib/python3.6/site-packages/wrapspawner/wrapspawner.py", line 125, in start
        return self.child_spawner.start()
      [Previous line repeated 985 more times]
      File "/py36/lib/python3.6/site-packages/wrapspawner/wrapspawner.py", line 123, in start
        if not self.child_spawner:
      File "/py36/lib/python3.6/site-packages/traitlets/traitlets.py", line 556, in __get__
        return self.get(obj, cls)
    RecursionError: maximum recursion depth exceeded

Any idea?

gsteele13 commented 4 years ago

Hi all,

I've had a jupyterhub instance running for a few month now and ran into a similar error:

[E 2020-05-11 12:16:40.876 JupyterHub web:1216] Uncaught exception in write_error
    Traceback (most recent call last):
      File "/anaconda3/lib/python3.7/site-packages/tornado/web.py", line 1214, in send_error
        self.write_error(status_code, **kwargs)
      File "/anaconda3/lib/python3.7/site-packages/jupyterhub/handlers/base.py", line 1108, in write_error
        html = self.render_template('%s.html' % status_code, **ns)
      File "/anaconda3/lib/python3.7/site-packages/jupyterhub/handlers/base.py", line 1043, in render_template
        template = self.get_template(name)
      File "/anaconda3/lib/python3.7/site-packages/jupyterhub/handlers/base.py", line 1037, in get_template
        return self.settings['jinja2_env'].get_template(name)
      File "/anaconda3/lib/python3.7/site-packages/jinja2/environment.py", line 830, in get_template
        return self._load_template(name, self.make_globals(globals))
      File "/anaconda3/lib/python3.7/site-packages/jinja2/environment.py", line 804, in _load_template
        template = self.loader.load(self, name, globals)
      File "/anaconda3/lib/python3.7/site-packages/jinja2/loaders.py", line 405, in load
        return loader.load(environment, name, globals)
      File "/anaconda3/lib/python3.7/site-packages/jinja2/loaders.py", line 405, in load
        return loader.load(environment, name, globals)
      File "/anaconda3/lib/python3.7/site-packages/jinja2/loaders.py", line 405, in load
        return loader.load(environment, name, globals)
      [Previous line repeated 979 more times]
    RecursionError: maximum recursion depth exceeded

I'm using the native-auth authenticator (https://native-authenticator.readthedocs.io/en/latest/index.html), we have about 15 users.

I've restarted the server and things seem to be running again. But I could imagine that it might happen again after running a month or so.

Does anyone have a thought on where to look on this one?

Thanks, Gary