dice-group / JavaOnlineExercises

Java Online Exercises (Jupyter JOE)
https://github.com/dice-group/JavaOnlineExercises/wiki
7 stars 2 forks source link

nbguser not in database #10

Closed adibaba closed 5 years ago

adibaba commented 5 years ago

There is no db entry for nbguser. That can produce error messages on autograding.

-> add nbguser in database or -> remove all mentions (assignmentAdministration)

could also affect nbgadmin

adibaba commented 5 years ago

Note: If one of the accounts nbgadmin or nbguser is used to submit an assignment, the autograding produces an error:

$ nbgrader autograde "Example"
[AutogradeApp | INFO] Copying /home/nbgadmin/submitted/nbguser/Example/timestamp.txt -> /home/nbgadmin/autograded/nbguser/Example/timestamp.txt
[AutogradeApp | ERROR] No student with ID 'nbguser' exists in the database
[AutogradeApp | ERROR] There was an error processing assignment: /home/nbgadmin/submitted/nbguser/Example
[AutogradeApp | ERROR] Traceback (most recent call last):
      File "/opt/conda/lib/python3.6/site-packages/nbgrader/api.py", line 1122, in find_student
        .filter(Student.id == student_id)\
      File "/opt/conda/lib/python3.6/site-packages/sqlalchemy/orm/query.py", line 2960, in one
        raise orm_exc.NoResultFound("No row was found for one()")
    sqlalchemy.orm.exc.NoResultFound: No row was found for one()

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/opt/conda/lib/python3.6/site-packages/nbgrader/converters/autograde.py", line 78, in init_assignment
        gb.find_student(student_id)
      File "/opt/conda/lib/python3.6/site-packages/nbgrader/api.py", line 1125, in find_student
        raise MissingEntry("No such student: {}".format(student_id))
    nbgrader.api.MissingEntry: No such student: nbguser

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/opt/conda/lib/python3.6/site-packages/nbgrader/converters/base.py", line 289, in convert_notebooks
        self.init_assignment(gd['assignment_id'], gd['student_id'])
      File "/opt/conda/lib/python3.6/site-packages/nbgrader/converters/autograde.py", line 82, in init_assignment
        raise NbGraderException(msg)
    nbgrader.converters.base.NbGraderException: No student with ID 'nbguser' exists in the database

[AutogradeApp | WARNING] Removing failed assignment: /home/nbgadmin/autograded/nbguser/Example
[AutogradeApp | ERROR] There was an error processing assignment 'Example' for student 'nbguser'
[AutogradeApp | ERROR] Please see the error log (.nbgrader.log) for details on the specific errors on the above failures.
adibaba commented 5 years ago

https://github.com/dice-group/nbgraderutils/commit/6c09a229c1a8de725283c0532eb7b02f53d34b59 (Added accounts)
Still open: Can not write user home, skipping: /home/nbguser on autograding

adibaba commented 5 years ago

Solved with https://github.com/dice-group/nbgraderutils/commit/31b0b1e6f8000de174094bea012bf76f994a5d16 https://github.com/dice-group/nbgraderutils/commit/53cc3994fae216ffaf23ba923fa4ae64318dd600