Skip to content

Commit

Permalink
enhance logged errors in otter grade
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispyles committed Nov 7, 2024
1 parent 71f9f7b commit ad7fe71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions otter/grade/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from typing import Any, Optional

from . import __name__ as pkg_name
from .utils import OTTER_DOCKER_IMAGE_NAME, TimeoutException
from .utils import format_exception, OTTER_DOCKER_IMAGE_NAME, TimeoutException
from .. import logging
from ..run import AutograderConfig
from ..test_files import GradingResults
Expand Down Expand Up @@ -245,10 +245,10 @@ def kill_container():

except TimeoutException as te:
scores = GradingResults.without_results(te)
LOGGER.error(f"Notebook Grading Timeout Error: {nb_basename}")
LOGGER.error(f'Submission "{nb_basename}" timed out during grading')
except Exception as e:
scores = GradingResults.without_results(e)
LOGGER.error(f"Notebook Grading Error: {nb_basename}")
LOGGER.error(f'An error occurred while grading "{nb_basename}":\n{indent(format_exception(e), ' > ')}')

finally:
scores.file = nb_basename
Expand Down

0 comments on commit ad7fe71

Please sign in to comment.