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

Released assignment is not visible for student in assignments tab #578

Open
inkrement opened this issue Dec 11, 2016 · 17 comments
Open

Released assignment is not visible for student in assignments tab #578

inkrement opened this issue Dec 11, 2016 · 17 comments

Comments

@inkrement
Copy link

System: Jupyterhub + nbgrade (newest version)

I released an new assignment (to /srv/nbgrader/exchange), but a test-student is not able to see it in the assignment tab. If I download it manually (nbgrader fetch assignment_1 --course=SMA) it works and I am also able to submit it...

It's also there if I run nbgrade list in a students terminal. This behaviour is strange, isn't it?

screen shot 2016-12-11 at 14 42 40

@jhamrick
Copy link
Member

Just to clarify, the screenshot you're showing is after you have fetched it from the command line (i.e. it is showing nbgrader working correctly)?

@inkrement
Copy link
Author

Yes, exactly. First I tried to fetch it with the UI (but all groups were empty) and then I fetched it manually (and now there are some entries).

@jhamrick
Copy link
Member

Hmm. Are there any errors in the javascript console?

It looks like you're using JupyterHub from the screenshot -- can you try manually running the notebook from the command line and then seeing also if there are any errors in the log messages?

@inkrement
Copy link
Author

Yes, I am using JupyterHub and I get no error in the jupyterhub output and also no error in my browsers JS console :/

@jhamrick
Copy link
Member

Sorry, I meant the output from the notebook server itself, rather than JupyterHub -- I don't think there is an easy way to access this when running the notebook server through JupyterHub, which is why I suggested running it manually from the command line (i.e. with jupyter notebook).

@inkrement
Copy link
Author

If I use the jupyter notebook command I also see the fetch-button! So just the jupyterhub and nbgrader combination does not work as expected, are they supposed to work together?

@jhamrick
Copy link
Member

What is your JupyterHub config? It's possible that might be causing issues -- see https://groups.google.com/forum/#!topic/jupyter-education/VBd9nhq2crs for an example where someone else had a similar problem.

@inkrement
Copy link
Author

ok thanks for the link. I have the same problem, but in my case c.Spawner.disable_user_config = True is not set (so the default is used). Now I updated jupyter, jupyterhub and nbgrader using pip and tried to install/enable the extension again, but I got following error:

chris@notebook:~$ jupyter nbextension install --sys-prefix --overwrite --py nbgrader
Traceback (most recent call last):
  File "/usr/local/bin/jupyter-nbextension", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/jupyter_core/application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/home/chris/.local/lib/python3.5/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/usr/local/lib/python3.5/dist-packages/notebook/nbextensions.py", line 969, in start
    super(NBExtensionApp, self).start()
  File "/usr/local/lib/python3.5/dist-packages/jupyter_core/application.py", line 256, in start
    self.subapp.start()
  File "/usr/local/lib/python3.5/dist-packages/notebook/nbextensions.py", line 745, in start
    self.install_extensions()
  File "/usr/local/lib/python3.5/dist-packages/notebook/nbextensions.py", line 724, in install_extensions
    **kwargs
  File "/usr/local/lib/python3.5/dist-packages/notebook/nbextensions.py", line 225, in install_nbextension_python
    m, nbexts = _get_nbextension_metadata(module)
  File "/usr/local/lib/python3.5/dist-packages/notebook/nbextensions.py", line 1143, in _get_nbextension_metadata
    'it is missing the `_jupyter_nbextension_paths()` method.'.format(module))
KeyError: 'The Python module nbgrader is not a valid nbextension, it is missing the `_jupyter_nbextension_paths()` method.'

@lgpage
Copy link
Member

lgpage commented Dec 30, 2016

The current version of nbgrader (v0.3.1) on pip requires the extensions to be install and activated with nbgrader extension install and nbgrader extension activate. https://nbgrader.readthedocs.io/en/stable/user_guide/installation.html

@inkrement
Copy link
Author

Oh thanks. Would you recommend to stick to the master version or wait for the latest to be released on pip? I have to set it up till march, so there would be enough time left. Maybe it works with the latest version... One big change of the new version is that it can be easily installed for all (Jupiterhub) users with a single command, right?

@jhamrick
Copy link
Member

jhamrick commented Jan 7, 2017

Yes, it is much easier to install for all users on JupyterHub using the master version.

I am working on getting a new release ready for 0.4.0 in the next few weeks, so I'd recommend using master for now (just so you can make sure everything in your deployment is working with the most recent stuff) and then by the time your class starts there will be a new release to use.

@jhamrick
Copy link
Member

jhamrick commented Jan 7, 2017

Also, after updating everything and installing the nbextensions again, are you still seeing the same issue (where no assignments are appearing)?

@inkrement
Copy link
Author

I don't know. We have hardware problems with our server, so I am not able to use/try it yet :/

@jhamrick
Copy link
Member

jhamrick commented Jan 9, 2017

Ok, let me know when you get that sorted out if you are still having problems!

@inkrement
Copy link
Author

I will close the issue now and reopen it, if this also happens with the new release.

@jhamrick jhamrick added this to the No action milestone Jan 9, 2017
@hkarl
Copy link
Contributor

hkarl commented Oct 22, 2018

Hello,

for what it is worth, it seems this bug / the missing assingment tab display bug #573 is still not fully cured (compare https://groups.google.com/forum/#!msg/jupyter-education/VBd9nhq2crs/F3qPy0kXBAAJ). With current installation, we again have perhaps 10% of our students not getting the assignment tab displayed. As this is a class of > 550 students, that's still quite inconvenient. Command-line access to assingments seems to work, but is not easy to explain.

Setting config.disable_user_config = True disabled logins altogether 👎

Best,

Holger

Config:

jhubrunner@gp1:~/.jupyter$ pip freeze | grep nbgrader
nbgrader==0.5.3
jhubrunner@gp1:~/.jupyter$ pip freeze | grep jupyter
jupyter==1.0.0
jupyter-client==5.2.3
jupyter-console==6.0.0
jupyter-core==4.4.0
jupyterhub==0.8.1
jupyterhub-systemdspawner==0.9.10

jupyterhub_config.py

# pre-configuration section for GP at UPB
gp1_admins = set( {{ admins }} )
gp1_tutors = set( {{ tutors }} )
gp1_students = set( {{ students }} )
gp1_allusers = gp1_admins | gp1_tutors | gp1_students

#  
#  Consider using service_tokens for general services that talk to the JupyterHub
#  API.
c.JupyterHub.api_tokens = { '{{ jupyterhub_token }}': '{{ jupyterhub_token_user }}' }


## Whether to shutdown single-user servers when the Hub shuts down.
#  
#  Disable if you want to be able to teardown the Hub while leaving the single-
#  user servers running.
#  
#  If both this and cleanup_proxy are False, sending SIGINT to the Hub will only
#  shutdown the Hub, leaving everything else running.
#  
#  The Hub should be able to resume from database state.
c.JupyterHub.cleanup_servers = False


## The cookie secret to use to encrypt cookies.
#  
#  Loaded from the JPY_COOKIE_SECRET env variable by default.
c.JupyterHub.cookie_secret = bytes.fromhex( "DELETED")


## Dict of 'group': ['usernames'] to load at startup.
#  
#  This strictly *adds* groups and users to groups.
#  
#  Loading one set of groups, then starting JupyterHub again with a different set
#  will not remove users or groups from previous launches. That must be done
#  through the API.
#c.JupyterHub.load_groups = {}
c.JupyterHub.load_groups = {
    'sharedgrader': list(gp1_admins | gp1_tutors), #  | gp1_tutors
}


## The public facing port of the proxy
c.JupyterHub.port = 8000


## The Proxy Auth token.
#  
#  Loaded from the CONFIGPROXY_AUTH_TOKEN env variable by default.
c.JupyterHub.proxy_auth_token = 'DELETED'

c.JupyterHub.services = [
    {
        'name': 'cull-idle',
        'admin': True,
        'command': ['python3' ,'/usr/local/bin/cull_idle_servers.py', '--timeout=7200'],
    },
    {
        'name': 'shared-formgrader',
        'url': 'http://127.0.0.1:9000',
        'command': ['jupyterhub-singleuser', '--group=sharedgrader', '--NotebookApp.allow_remote_access=True'],
    }
]

## The class to use for spawning single-user servers.
#  
#  Should be a subclass of Spawner.
#c.JupyterHub.spawner_class = 'jupyterhub.spawner.LocalProcessSpawner'
c.JupyterHub.spawner_class = 'systemdspawner.SystemdSpawner'
c.SystemdSpawner.use_sudo = True
c.SystemdSpawner.mem_limit = '140M' # 60M for server, 30M per kernel
c.SystemdSpawner.cpu_limit = 0.5
c.SystemdSpawner.user_workingdir = '/home/{USERNAME}/jupyter-notebooks'
c.SystemdSpawner.isolate_tmp = True
c.SystemdSpawner.disable_user_sudo = True
c.SystemdSpawner.isolate_devices = False # this kills shell access otherwise!


## Path to SSL certificate file for the public facing interface of the proxy
#  
#  Use with ssl_key
c.JupyterHub.ssl_cert = '/home/jhubrunner/.jupyter/ssl.pem'

## Path to SSL key file for the public facing interface of the proxy
#  
#  Use with ssl_cert
c.JupyterHub.ssl_key = '/home/jhubrunner/.jupyter/ssl.key'


## Extra arguments to be passed to the single-user server.
#  
#  Some spawners allow shell-style expansion here, allowing you to use
#  environment variables here. Most, including the default, do not. Consult the
#  documentation for your spawner to verify!
c.Spawner.args = ['--NotebookApp.allow_remote_access=True']



## Path to the notebook directory for the single-user server.
#  
#  The user sees a file listing of this directory when the notebook interface is
#  started. The current interface does not easily allow browsing beyond the
#  subdirectories in this directory's tree.
#  
#  `~` will be expanded to the home directory of the user, and {username} will be
#  replaced with the name of the user.
#  
#  Note that this does *not* prevent users from accessing files outside of this
#  path! They can do so with many other means.
c.Spawner.notebook_dir = '~/jupyter-notebooks'


## Interval (in seconds) on which to poll the spawner for single-user server's
#  status.
#  
#  At every poll interval, each spawner's `.poll` method is called, which checks
#  if the single-user server is still running. If it isn't running, then
#  JupyterHub modifies its own state accordingly and removes appropriate routes
#  from the configurable proxy.
c.Spawner.poll_interval = 300

#  
#  Admin access should be treated the same way root access is.
#  
#  Defaults to an empty set, in which case no user has admin access.
c.Authenticator.admin_users = set(['jhubrunner',]) | gp1_admins

## Whitelist of usernames that are allowed to log in.
#  
#  Use this with supported authenticators to restrict which users can log in.
#  This is an additional whitelist that further restricts users, beyond whatever
#  restrictions the authenticator has in place.
#  
#  If empty, does not perform any additional restriction.
c.Authenticator.whitelist = set(['jhubrunner']) | gp1_allusers

@jhamrick
Copy link
Member

Hmm. I am not sure why the issue would only affect 10% of students... it sounds like maybe there is a race condition somewhere. I am reopening this so we can track it.

@jhamrick jhamrick reopened this Dec 15, 2018
@jhamrick jhamrick added bug and removed question labels Dec 15, 2018
@jhamrick jhamrick added this to the 0.6.0 milestone Dec 15, 2018
@jhamrick jhamrick modified the milestones: 0.6.0, 0.7.0 May 30, 2019
@jhamrick jhamrick removed this from the 0.7.0 milestone Mar 18, 2021
@jhamrick jhamrick added this to the 0.8.0 milestone Mar 18, 2021
@jhamrick jhamrick modified the milestones: 0.8.0, 0.8.1 Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants