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

Formgrader error without details #1937

Open
lahwaacz opened this issue Nov 15, 2024 · 0 comments
Open

Formgrader error without details #1937

lahwaacz opened this issue Nov 15, 2024 · 0 comments

Comments

@lahwaacz
Copy link
Contributor

lahwaacz commented Nov 15, 2024

We just encountered this error when using the formgrader:

Image

First, it does not show any useful information - even the administrator of the course has a hard time understanding what is the problem.

We had to contact the k8s admin who found more details in the logs of the pod where the nbgrader service is running:

[E 2024-11-15 05:15:46.668 ServerApp] Uncaught exception GET /services/course123/formgrader/submissions/392a41a720bb4019b5ac6a7fbc58987b ([redacted])
    HTTPServerRequest(protocol='https', host='[redacted]', method='GET', uri='/services/course123/formgrader/submissions/392a41a720bb4019b5ac6a7fbc58987b', version='HTTP/1.1', remote_ip='[redacted]')
    Traceback (most recent call last):
      File "/usr/lib/python3.12/site-packages/tornado/web.py", line 1788, in _execute
        result = method(*self.path_args, **self.path_kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.12/site-packages/tornado/web.py", line 3301, in wrapper
        return method(self, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.12/site-packages/nbgrader/server_extensions/formgrader/base.py", line 113, in wrapper
        return f(self, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.12/site-packages/nbgrader/server_extensions/formgrader/base.py", line 122, in wrapper
        return f(self, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.12/site-packages/nbgrader/server_extensions/formgrader/handlers.py", line 119, in get
        submission = self.gradebook.find_submission_notebook_by_id(submission_id)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.12/site-packages/nbgrader/api.py", line 2558, in find_submission_notebook_by_id
        .one()
         ^^^^^
      File "/usr/lib/python3.12/site-packages/sqlalchemy/orm/query.py", line 2778, in one
        return self._iter().one()  # type: ignore
               ^^^^^^^^^^^^
      File "/usr/lib/python3.12/site-packages/sqlalchemy/orm/query.py", line 2827, in _iter
        result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
                                                      ^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 2362, in execute
        return self._execute_internal(
               ^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 2237, in _execute_internal
        conn = self._connection_for_bind(bind)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 2106, in _connection_for_bind
        return trans._connection_for_bind(engine, execution_options)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<string>", line 2, in _connection_for_bind
      File "/usr/lib/python3.12/site-packages/sqlalchemy/orm/state_changes.py", line 103, in _go
        self._raise_for_prerequisite_state(fn.__name__, current_state)
      File "/usr/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 973, in _raise_for_prerequisite_state
        raise sa_exc.PendingRollbackError(
    sqlalchemy.exc.PendingRollbackError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (sqlite3.OperationalError) attempt to write a readonly database
    [SQL: UPDATE comment SET manual_comment=? WHERE comment.id = ?]
    [parameters: ('[redacted]', '77577e8299a24c76bf482a37171db0bc')]
    (Background on this error at: https://sqlalche.me/e/20/e3q8) (Background on this error at: https://sqlalche.me/e/20/7s2a)

Now we have to solve the problem with the database, but that is another issue...

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

No branches or pull requests

1 participant