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

otter run generates an error #349

Closed
spring-haru opened this issue Aug 28, 2021 · 1 comment · Fixed by #351
Closed

otter run generates an error #349

spring-haru opened this issue Aug 28, 2021 · 1 comment · Fixed by #351
Labels
bug Something isn't working
Milestone

Comments

@spring-haru
Copy link

spring-haru commented Aug 28, 2021

Describe the bug
Running the following code in Jupyter Notebook

from otter.api import grade_submission
grade_submission("autograder.zip", "test-assign-seed.ipynb")

generates the following error

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/var/folders/qh/l1jlxh294kv8ddzg803xyrzw0000gn/T/ipykernel_21166/3617444135.py in <module>
      1 # grade_submission("./dist/autograder/autograder.zip","./submissions/test-assign-seed.ipynb")
----> 2 grade_submission("autograder.zip","test-assign-seed.ipynb")

/opt/anaconda3/envs/otter/lib/python3.8/site-packages/otter/api.py in grade_submission(ag_path, submission_path, quiet, debug)
     54     # TODO: is the output_dir argument of run_grader necessary here?
     55     with cm:
---> 56         results = run_grader(submission_path, ag_path, dp, True, debug)
     57 
     58     if quiet:

TypeError: main() takes 1 positional argument but 5 were given

To Reproduce
Steps to reproduce the behavior:

  1. After running otter assign ... and filling answers in test-assign-seed.ipynb, place the file and autograder.zip in a given folder.
  2. Start Jupyter Notebook and set the working directory to the folder using %cd ..
  3. Execute the cell with the above code.

Expected behavior
Returns an otter.test_files.GradingResults object.

Versions
otter-grader 3.0.4

Additional context
macOS Big Sur

[EDIT]
'autograder.zip' and 'test-assign-seed.ipynb' are Assign Format v1.

@spring-haru spring-haru added the bug Something isn't working label Aug 28, 2021
chrispyles added a commit to chrispyles/otter-grader that referenced this issue Aug 28, 2021
@chrispyles
Copy link
Member

Implemented a fix in #351 that will be included in v3.0.5.

@chrispyles chrispyles added this to the v3.0.5 milestone Aug 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants