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

[multi-class setting] formgrader errors out if the service user does not exist in Jupyterhub's database #1872

Open
goekce opened this issue Mar 27, 2024 · 0 comments
Labels

Comments

@goekce
Copy link

goekce commented Mar 27, 2024

Operating system

ArchLinux

nbgrader --version

0.9.2

jupyterhub --version (if used with JupyterHub)

4.0.2

jupyter notebook --version

7.1.2

Expected behavior

Formgrader page does not show an error.

Actual behavior

Error

 Sorry, the formgrader encountered an error. Please contact the administrator of the formgrader for further assistance. 

Steps to reproduce the behavior

  1. Use PAMAuthenticator
  2. Use SystemdSpawner (I believe this is unrelated)
  3. Follow the tutorial Example use case: multiple classes
  4. go to the class formgrader service page (example.com/services/test)
  5. . Click on Manage Assignments

Jupyterhub log:

  • service name: test
  • service user: grader-test
... JupyterHub log:191] 404 GET /hub/api/users/grader-test ...
... ServerApp] Error: Not able to get Jupyterhub user: {authenticated_user}
... ServerApp] Make sure you start your service with a valid admin_user 'api_token' in your Jupyterhub config
... ServerApp] Uncaught exception GET /services/test/formgrader
...
nbgrader.auth.jupyterhub.JupyterhubApiError: JupyterhubAPI returned a status code of: 404 for api_path: /users/grader-test
ServerApp] 500 GET /services/test/formgrader

Browser request log

also shows a 500


Adding the service user (which already exists in /etc/passwd) using the admin panel solves the issue.

Why does the service user has to exist in Jupyterhub's database? Is this a bug or feature?

@goekce goekce changed the title [multi-class setting] formgrader errors out if the service user for a class does not exist in Jupyterhub database [multi-class setting] formgrader errors out if the service user does not exist in Jupyterhub's database Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants