Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure in ProfilesSpawner.load_child_class() with empty/no sqlite database #10

Closed
rcthomas opened this issue Sep 21, 2017 · 14 comments
Closed

Comments

@rcthomas
Copy link
Contributor

This is with JuptyterHub 0.8.0b5 --- when I start up without any pre-existing sqlite database I still get the KeyError. Maybe a recent change there causes this to fail now?

@SaintSimmo
Copy link

Same issue. Got around it by defining a default child_profile that exists (where before it was simple ''). Now stuck on #11 which seems to be a bigger issue.

@jrdemasi
Copy link

jrdemasi commented Nov 6, 2017

@SaintSimmo Can you elaborate on how you got around it for users who are less familiar with what you're talking about?

@SaintSimmo
Copy link

@jrdemasi I ultimately ended up going with imagespawner (https://github.com/ryanlovett/imagespawner) for choosing a docker image upon starting up one's personal server. If you're using docker images, this is what I'd go with for right now at least.

I never ended up being able to get wrapspawner to fully work for my needs.

@opoplawski
Copy link

I'm seeing this as well with jupyterhub 0.8.1.

@jrdemasi
Copy link

jrdemasi commented Nov 9, 2017 via email

@rbhatia5
Copy link

I'm also seeing this issue, curious if anyone's solved it well

@chiroptical
Copy link

Is this the issue you all are seeing? I don't want to submit another issue if it is.

Using:

  • Python 3.5.2 :: Anaconda 4.2.0 (64-bit)
  • JupyterHub: v0.8.1 (conda install -c conda-forge jupyterhub=0.8.1)
  • {Wrap,Batch}Spawner most recent git master branch

Issue:

HTTPServerRequest(protocol='http', host='<redacted>', method='GET', uri='/hub/home', version='HTTP/1.1', remote_ip='<redacted>', headers=<redacted>)
Traceback (most recent call last):
    File "<path>/lib/python3.5/site-packages/tornado/web.py", line 1469, in _execute
    result = yield result
    File "<path>/lib/python3.5/site-packages/jupyterhub/handlers/pages.py", line 67, in get
    if user.running:
    File "<path>/lib/python3.5/site-packages/jupyterhub/user.py", line 240, in running
    return self.spawner.ready
    File "<path>/lib/python3.5/site-packages/jupyterhub/user.py", line 215, in spawner
    return self.spawners['']
    File "<path>/lib/python3.5/site-packages/jupyterhub/user.py", line 105, in __getitem__
    self[key] = self.spawner_factory(key)
    File "<path>/lib/python3.5/site-packages/jupyterhub/user.py", line 209, in _new_spawner
    spawner.load_state(orm_spawner.state or {})
    File "<path>/lib/python3.5/site-packages/wrapspawner/wrapspawner.py", line 91, in load_state
    self.load_child_class(state)
    File "<path>/lib/python3.5/site-packages/wrapspawner/wrapspawner.py", line 211, in load_child_class
    raise KeyError('jupyterhub database might be outdated, please reset it, in the default configuration, just delete jupyterhub.sqlite')
KeyError: 'jupyterhub database might be outdated, please reset it, in the default configuration, just delete jupyterhub.sqlite'

@sknigh
Copy link

sknigh commented Dec 7, 2017

I am getting the same error output as @barrymoo from a virtual environment-based installation. Are there any workarounds for this?

@jrdemasi
Copy link

jrdemasi commented Dec 8, 2017 via email

@sknigh
Copy link

sknigh commented Dec 13, 2017

Unfortunately I need some of the bug fixes in 0.8.

Sticking this to the end of my installation script makes profilespawner work with my slurm queues.

sed -i '75i\                oauth_client_id = self.oauth_client_id,' /usr/lib/python3.4/site-packages/wrapspawner/wrapspawner.py
sed -i '75i\                server = self._server,' /usr/lib/python3.4/site-packages/wrapspawner/wrapspawner.py
sed -i "213s/.*/            self.child_profile = ''/" /usr/lib/python3.4/site-packages/wrapspawner/wrapspawner.py

@Luke035
Copy link

Luke035 commented Dec 13, 2017

Same issue here with Jupyterhub 0.8.1, Python 3.5.4 Anaconda 5.0.1.
My profiles are simple BatchSpawner profiles that I've always run with Jupyterhub 0.7.2

@rcthomas
Copy link
Contributor Author

Have a look here.

master...NERSC:non-fatal-if-no-db

I never submitted it as a PR as I wasn't able to work through what all this change impacted and I wasn't able to fully test it due to #11 but thought I'd mention it. Haven't had time to get back to either issue yet...

@sknigh
Copy link

sknigh commented Dec 13, 2017

@rcthomas Oauth doesn't work because jupyterhub 0.8 configures it for the set spawner, but wrapspawner hasn't been updated to copy that information to it's child profile. See the first sed insertion from my comment above.

@rcthomas
Copy link
Contributor Author

@sknigh I tried your fix and it works for me on 0.8 --- any reason you haven't submitted that as a PR addressing this issue and #11 both?

clkao added a commit to clkao/wrapspawner that referenced this issue Jan 30, 2018
dantreiman added a commit to dantreiman/wrapspawner that referenced this issue Feb 2, 2018
@minrk minrk closed this as completed in #16 Feb 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants