LibreTexts / nbgrader-to-jupyterlab

A system for assigning and grading notebooks
https://nbgrader.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

A small fix seems needed. #10

Closed sdyang1729 closed 4 years ago

sdyang1729 commented 4 years ago

Operating system

mac os Catalina 10.15.4

nbgrader --version

0.7.0.dev

jupyterhub --version (if used with JupyterHub)

N/A

jupyter notebook --version

6.0.3

Expected behavior

Actual behavior

As of 06/10/2020, when I try to install the https://github.com/LibreTexts/nbgrader-to-jupyterlab/tree/lab-common branch, the following error message appears when executing jupyter lab.

nbgrader-to-jupyterlab/nbgrader/labextensions/assignment_list/assignment_list/handlers.py", line 357, in setup_handlers
        lab_app.web_app.settings[url] = AssignmentList(parent=lab_app)
      File "/opt/anaconda3/envs/nbgradertest2/lib/python3.8/site-packages/traitlets/config/configurable.py", line 67, in __init__
        kwargs['config'] = parent.config
    AttributeError: 'NotebookWebApplication' object has no attribute 'config'

My Solution

I had to change the line 19 of the nbgrader/labextensions/assignment_list/assignment_list/init.py from "setup_handlers(lab_app.web_app)" to "setup_handlers(lab_app)". Then it works as expected.

I hope this is of some help to those who try to install this branch.

Lawrence37 commented 4 years ago

@aalmanza1998 Is the proposed solution correct?

aalmanza1998 commented 4 years ago

@aalmanza1998 Is the proposed solution correct?

yes, I checked the handlers.py file and the setup requires lab_app not a lab_app.web_app