rstudio/pygradethis

Error in running pygradethis in the sample learnR tutorial

Opened this issue · 2 comments

I'm trying to run pygradethis under learnR but I have encountered an error (I'm trying to run in a Ubuntu 20.04.3 LTS docker image with R and RStudio server installed). The following are the details.

I have already installed the reticulate library in R and other R libraries (e.g. learnR, gradethis). Then I built the pygradethis R library by running "make install" under the folder "pygradethis/R". Inside R console, library("pygradethis") can be executed successfully.

Then, I'm trying to run the python.check.Rmd example under /pygradethis/R/inst/tutorials/python-check. inside RStudio . The learnR tutorial can be launched but when I'm clicking the submit answer, it outputs the error message "Error occurred while evaluating 'exercise.checker'".

Capture

The following error message occurs in the R console.

Output created: python-check.html

Listening on http://127.0.0.1:3727
Error occurred while evaluating 'exercise.checker': KeyError: 'e'

Detailed traceback:
  File "/usr/local/lib/python3.8/dist-packages/pygradethis/python_grade_learnr.py", line 148, in python_grade_learnr
    message="Error occured while checking the submission. {e}".format(e),

Anyone can help with the problem? Thank you.

Hello @cswclui, this error in particular makes it difficult to know exactly what's going wrong because it seems like the error object itself isn't found on the Python side. Did anything get printed on the console besides that message? We're currently working on refining the connections between learnr and pygradethis so that we properly pass along the right things for grading to work. I will keep this issue in mind as we make updates!

Thanks for your reply.
That seems to be the only message printed in console.