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

Release feedback fails after #1774 #1897

Open
iyanmv opened this issue Jul 1, 2024 · 3 comments
Open

Release feedback fails after #1774 #1897

iyanmv opened this issue Jul 1, 2024 · 3 comments
Labels

Comments

@iyanmv
Copy link

iyanmv commented Jul 1, 2024

I think because of #1774, trying to re-release feedback can fail if submission was done prior to the update because the current code does not take into account that the file submission_secret.txt might not exist.

with open(os.path.join(feedback_dir, "submission_secret.txt")) as fh:
submission_secret = fh.read()

Operating system

nbgrader --version

Python version 3.11.8 | packaged by conda-forge | (main, Feb 16 2024, 20:53:32) [GCC 12.3.0]
nbgrader version 0.9.3

jupyterhub --version (if used with JupyterHub)

4.0.2

jupyter notebook --version

7.2.1

Expected behavior

Updating nbgrader should not break releasing feedback of older submissions.

Actual behavior

If submission_secret.txt does not exist in the feedback folder, release feedback will fail.

Steps to reproduce the behavior

  1. Take an old submission (from before updating to current version)
  2. Recreate feedback (this works)
  3. Release feedback (this fails)
@brichet brichet added the bug label Jul 1, 2024
@tuncbkose
Copy link
Contributor

Oops, I guess at the time of making that PR, I didn't think that people would upgrade nbgrader in the middle of a course, which is my fault.

As a quick fix, it may be possible to downgrade and release feedback for that student individually (so that other submissions don't create problems if they have a submission_secret.txt).

For a more general fix, I guess the old code is still there, so we could have an if statement seeing if the file exists. But suppose a case where the submission_secret.txt was created then deleted for some reason. Since something went wrong, I would argue nbgrader should complain, and this solution could prevent that. So I'd be happier with marking this as a breaking change instead.

Happy to hear other opinions as well!

@iyanmv
Copy link
Author

iyanmv commented Jul 1, 2024

Hi! Thanks for the quick reply. It's not a big problem for us, but I just wanted to let you know because I guess it was an unintended side effect of that PR.

And yes, we recreate our JupyterHub image every week updating all packages (nbgrader included) using the compatible release operator. In the case of nbgrader I use nbgrader~=0.9. I guess such a change would have been better to keep it for 0.10.x. But if no one else reported it, I guess most people fix the version completely and only update before starting a new course.

@perllaghu
Copy link
Contributor

We will need a solution that can operate across a "live" course: our institution teaches summer courses and evening classes that fall outside the normal academic semesters - so we can have active courses any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants