KeyError when calling `nbgrader feedback`
See original GitHub issueI am having an issue when trying to create the feedback of graded assignments. Basically I am getting a KeyError every time I try.
Operating system
MacOS 10.13.6
nbgrader --version
v 0.5.5
jupyterhub --version
(if used with JupyterHub)
Not using JupyterHub
jupyter notebook --version
v 5.7.8
Expected behavior
Feedback html files should be created in the feedback/
directory when nbgrader feedback ps1
is called.
Actual behavior
I get the following error and the empty /feedback/stu1/
directory is created. Here is the beginning and end of the error.
bash-3.2$ nbgrader autograde ps1
[AutogradeApp | INFO] Skipping existing assignment: /Users/bstone/test_course/my_test_course_1/autograded/stu1/ps1
bash-3.2$ nbgrader feedback ps1
[FeedbackApp | INFO] Copying /Users/bstone/test_course/my_test_course_1/autograded/stu1/ps1/jupyter.png -> /Users/bstone/test_course/my_test_course_1/feedback/stu1/ps1/jupyter.png
[FeedbackApp | INFO] Converting notebook /Users/bstone/test_course/my_test_course_1/autograded/stu1/ps1/problem1.ipynb
[FeedbackApp | ERROR] There was an error processing assignment: /Users/bstone/test_course/my_test_course_1/autograded/stu1/ps1
[FeedbackApp | ERROR] Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/nbgrader/converters/base.py", line 293, in convert_notebooks
self.convert_single_notebook(notebook_filename)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/nbgrader/converters/base.py", line 249, in convert_single_notebook
output, resources = self.exporter.from_filename(notebook_filename, resources=resources)
:
:
: MISSING CHUNK HERE
:
:
<b>Comments:</b> {{ cell.metadata.nbgrader.comment | markdown2html | strip_files_prefix }}
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/nbconvert/exporters/html.py", line 74, in markdown2html
cell = context['cell']
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/jinja2/runtime.py", line 305, in __getitem__
raise KeyError(key)
KeyError: 'cell'
[FeedbackApp | WARNING] Removing failed assignment: /Users/bstone/test_course/my_test_course_1/feedback/stu1/ps1
[FeedbackApp | ERROR] There was an error processing assignment 'ps1' for student 'stu1'
[FeedbackApp | ERROR] Please see the error log (.nbgrader.log) for details on the specific errors on the above failures.
bash-3.2$
Steps to reproduce the behavior
- Before starting I ran
pip install 'SQLAlchemy==1.2.18'
according to the issues discussions. - I used the
nbgrader quickstart test_course
command to create a course. - I added
/tmp/exchange
directory and modified the config file as per the documentation. - Then assigned the problems with
nbgrader assign ps1
. - Next I used the Formgrader to release the assignment.
- Then created
/submitted/stu1/ps1/
via terminal and copied the released assignments (untouched) into this directory. - Using the jupyter interface, I then autograded and manually graded both problem sets in
ps1
. - Everything worked fine up to here. But when I run
nbgrader feedback ps1
I get the above error.
Not sure what I am doing wrong, but any help will be appreciated. Of course if you want the whole error report, I can post it.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
nbgrader generate feedback - Read the Docs
Generate feedback from a graded notebook Options ======= The options below ... This function is called after the notebooks are converted and should...
Read more >python - Key Error - Jupyter Notebook - Stack Overflow
I have started to learn pandas. I am using Jupyter notebook. I have imported the test data file -Weather I read the file...
Read more >Jupyter Notebook Documentation - Read the Docs
Code is run in a separate process called the Kernel. The Kernel can be interrupted or restarted. Try running the.
Read more >Getting KeyError: groups from ArcGIS API for Python
KeyError Traceback (most recent call last) /opt/conda/lib/python3.6/site-packages/arcgis/gis/__init__.py in __getitem__(self, ...
Read more >[listkernelspecs] warning | The AI Search Engine You Control
Feedback. What do you think of this? ... Activating the environment and calling jupyter kernelspec list in the Terminal produces: ... nbgrader --version....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What version of nbconvert are you using? (You can find out with
jupyter nbconvert --version
). If the version you have is 5.5.0, can you try downgrading to 5.4.1 (you can do this withpip install nbconvert==5.4.1
)?For context: there are some issues with the current version of nbconvert that cause errors with nbgrader, which are fixed on the master version of nbconvert but which have not yet been released yet.
This should now be fixed in nbconvert 5.6, so I am going to close this issue.