Open JBRhoads opened 1 year ago
I am also having the same error. Did you find any workaround for this? It's common for students to forget to delete the .ipynb_checkpoints before submitting.
Yes, here's the workaround I'm using. First, find where your ngshare.db is. Also, you have to install sqlite3.
To view the submissions which contain .ipynb_checkpoints files:
sqlite3 ngshare.db 'select * from submission_files_assoc_table join files on files._id=submission_files_assoc_table.right_id where files.filename like "%.ipynb_checkpoints%";' '.exit'
I suggest backing up your ngshare.db file, just in case.
Then to delete the associations:
sqlite3 ngshare.db 'delete from submission_files_assoc_table where ROWID IN (select submission_files_assoc_table.ROWID from submission_files_assoc_table join files on files._id=submission_files_assoc_table.right_id where files.filename like "%.ipynb_checkpoints%");' '.exit'
Run the first command again to see that the files are now unassociated.
To make this easier for me, I'm just running the delete command every night via a CronJob deployment in k8s.
@JBRhoads
Oops, I fixed step 3.
No, ngshare.db will be in the ngshare server pod. Yeah, you can install sqlite3 there (I haven't tried this) or you can on whichever system that can also access that same persistent volume that's being used by ngshare.
@JBRhoads Thank you very much for such a quick response. It's working as per your suggestion. :)
Yes, here's the workaround I'm using. First, find where your ngshare.db is. Also, you have to install sqlite3.
1. To view the submissions which contain .ipynb_checkpoints files: `sqlite3 ngshare.db 'select * from submission_files_assoc_table join files on files._id=submission_files_assoc_table.right_id where files.filename like "%.ipynb_checkpoints%";' '.exit'` 2. I suggest backing up your ngshare.db file, just in case. 3. Then to delete the associations: `sqlite3 ngshare.db 'delete from submission_files_assoc_table where ROWID IN (select submission_files_assoc_table.ROWID from submission_files_assoc_table join files on files._id=submission_files_assoc_table.right_id where files.filename like "%.ipynb_checkpoints%");' '.exit'` 4. Run the first command again to see that the files are now unassociated.
To make this easier for me, I'm just running the delete command every night via a CronJob deployment in k8s.
Thank you sharing, this worked. Can you please also share the manifest for the cron job?
We're seeing an issue where students submissions are including the .ipynb_checkpoints folder. But when the instructor collects the submissions, the .ipynb_checkpoints folder isn't downloaded even though nbgrader is still expecting it. This is a fatal error and the collection process won't continue even to the next student. Essentially, there's a mismatch where one side is ignoring but the other isn't. Currently, the only solution is for the students to manually delete the .ipynb_checkpoints folder before submitting.
I've confirmed that this file exists on within the exchange, but I guess it's refusing to copy the file even though nbgrader is expecting it.
The default variable in nbgrader_config.py (which I've also manually set just to be certain):
c.CourseDirectory.ignore = ['.ipynb_checkpoints', '*.pyc', '__pycache__', 'feedback']