otter-grader icon indicating copy to clipboard operation
otter-grader copied to clipboard

Pass list name instead of secret to execute_log

Open chrispyles opened this issue 2 years ago • 1 comments

Bug from slack:

Currently, I am testing a simple notebook example with “otter run” locally, before wanting to move to Gradescope. I am running into the following issues: I get the following error

  File "/Users/lebrown/anaconda/envs/classf22/lib/python3.7/site-packages/otter/execute/execute_log.py", line 79, in execute_log
    for k, v in shelf.items():
RuntimeError: dictionary changed size during iteration

In execute/execute_log.py line 78, it is expecting variables to be None if not supplied. However, variables seems to be defaulting to: {} in runners/python_runner.py. Even if you force variables to None , then a KeyError appears.

File "/Users/lebrown/anaconda/envs/classf22/lib/python3.7/site-packages/otter/execute/execute_log.py", line 86, in execute_log
    global_env[check_results_list_name].append(
KeyError: '7YNGJV'

It looks like line 86 should maybe be:

global_env["check_results_"+check_results_list_name].append(
                global_env["grader"].check(entry.question, global_env=global_env))

chrispyles avatar Oct 24 '22 02:10 chrispyles

Codecov Report

Base: 73.21% // Head: 73.23% // Increases project coverage by +0.02% :tada:

Coverage data is based on head (6188138) compared to base (9e7fa86). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #571      +/-   ##
==========================================
+ Coverage   73.21%   73.23%   +0.02%     
==========================================
  Files          62       62              
  Lines        3759     3759              
==========================================
+ Hits         2752     2753       +1     
+ Misses       1007     1006       -1     
Impacted Files Coverage Δ
otter/execute/__init__.py 97.72% <ø> (ø)
otter/run/run_autograder/runners/python_runner.py 85.86% <ø> (ø)
otter/test_files/__init__.py 66.66% <100.00%> (+0.68%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Oct 24 '22 02:10 codecov[bot]