-
Couldn't load subscription status.
- Fork 328
Description
Operating system
Replicated on Mac OSX (10.14.6) and on a Ubuntu 18.04 Docker container.
nbgrader --version
nbgrader version 0.6.0.dev & nbgrader version 0.7.0.dev
jupyterhub --version (if used with JupyterHub)
Uknown, but bug is also replicated outside of JupyterHub.
jupyter notebook --version
6.0.1 & 6.0.0
Expected behavior
Typing nbgrader generate_feedback ASSIGNMENT or nbgrader feedback ASSIGNMENT at the command line should create ASSIGNMENT.html feedback form after grading if the assignment released to the students was named ASSIGNMENT.ipynb.
Actual behavior
No feedback forms are generated and the following error message is thrown:
[GenerateFeedbackApp | WARNING] Outdated config: use CourseDirectory.course_id rather than Exchange.course_id
[GenerateFeedbackApp | WARNING] Outdated config: use CourseDirectory.course_id rather than Exchange.course_id
[NbGraderApp | WARNING] Outdated config: use CourseDirectory.course_id rather than Exchange.course_id
[GenerateFeedbackApp | INFO] Copying /Users/tiffany/Documents/ubc-dsci/nbgrader_r_demo/autograded/bitdiddle/lab1/.DS_Store -> /Users/tiffany/Documents/ubc-dsci/nbgrader_r_demo/feedback/bitdiddle/lab1/.DS_Store
[GenerateFeedbackApp | INFO] Copying /Users/tiffany/Documents/ubc-dsci/nbgrader_r_demo/autograded/bitdiddle/lab1/lab1.html -> /Users/tiffany/Documents/ubc-dsci/nbgrader_r_demo/feedback/bitdiddle/lab1/lab1.html
[GenerateFeedbackApp | INFO] Converting notebook /Users/tiffany/Documents/ubc-dsci/nbgrader_r_demo/autograded/bitdiddle/lab1/lab1.ipynb
[GenerateFeedbackApp | INFO] Writing 287813 bytes to /Users/tiffany/Documents/ubc-dsci/nbgrader_r_demo/feedback/bitdiddle/lab1/lab1.html
[GenerateFeedbackApp | ERROR] There was an error processing assignment: /Users/tiffany/Documents/ubc-dsci/nbgrader_r_demo/autograded/bitdiddle/lab1
[GenerateFeedbackApp | ERROR] Traceback (most recent call last):
File "/Users/tiffany/nbgrader/nbgrader/converters/base.py", line 336, in convert_notebooks
self.convert_single_notebook(notebook_filename)
File "/Users/tiffany/nbgrader/nbgrader/converters/base.py", line 293, in convert_single_notebook
self.write_single_notebook(output, resources)
File "/Users/tiffany/nbgrader/nbgrader/converters/base.py", line 167, in write_single_notebook
self.writer.write(output, resources, notebook_name=resources['unique_key'])
File "//anaconda3/lib/python3.7/site-packages/nbconvert/writers/files.py", line 126, in write
with io.open(dest, 'w', encoding='utf-8') as f:
PermissionError: [Errno 13] Permission denied: '/Users/tiffany/Documents/ubc-dsci/nbgrader_r_demo/feedback/bitdiddle/lab1/lab1.html'
Steps to reproduce the behavior
This only apprears to happen when an .html named ASSIGNMENT.html is submitted by the student (where the assignment released to the student was named ASSIGNMENT.ipynb). There might be reasons why a student wants to render their notebook to .html and so I don't think this should prevent feedback forms from being generated. Maybe the feedback forms need a new name, something like ASSIGNMENT_feedback.html to make this less likely to happen? I can understand why nbgrader doesn't want to overwrite the files and that is why it is choking.
Interestingly I was incorrect about this and so have removed this comment.nbgrader generate_feedback --force ASSIGNMENT doesn't trigger this error and overwrites the ASSIGNMENT.html file. However the intitial error thrown when --force is not used does not give any indication to the user that --force could be used to overwrite the file. So, perhaps the simplest solution is to create a more useful error message here.