manual grading error

166 views
Skip to first unread message

Chao Sun

unread,
Feb 10, 2021, 9:05:20 AM2/10/21
to Teaching with Jupyter Notebooks
Dear everyone, 
I am a user of the nbgrader, it was working properly, however this semester, I found it does work for the manual grading portion:
"Sorry, the formgrader encountered an error. Please contact the administrator of the formgrader for further assistance."

Thanks for anyone's suggestions!


My lib's version:

Python:3.8.5
nbgrader.__version__:'0.6.1'
MacOS: 10.15.7

My config file:
   1 c = get_config()                                                                                                                         
   2 c.CourseDirectory.course_id = "MLES"
   3 c.CourseDirectory.db_assignments = [dict(name="AOSC447_EX_01")]
   4 c.IncludeHeaderFooter.header = "source/header.ipynb"
   5 c.Exchange.root = '/Users/easm/Documents/MLES/tmp/'


More error message from jupyter notebook is as following:

[I 09:01:32.083 NotebookApp] Released assignments:

[E 09:01:32.196 NotebookApp] Uncaught exception GET /formgrader/submissions/19d25b86b4a749c3928aa6267c1de89d/ (::1)

    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/formgrader/submissions/19d25b86b4a749c3928aa6267c1de89d/', version='HTTP/1.1', remote_ip='::1')

    Traceback (most recent call last):

      File "/Users/easm/opt/anaconda3/lib/python3.8/site-packages/tornado/web.py", line 1702, in _execute

        result = method(*self.path_args, **self.path_kwargs)

      File "/Users/easm/opt/anaconda3/lib/python3.8/site-packages/tornado/web.py", line 3173, in wrapper

        return method(self, *args, **kwargs)

      File "/Users/easm/opt/anaconda3/lib/python3.8/site-packages/nbgrader/server_extensions/formgrader/base.py", line 108, in wrapper

        return f(self, *args, **kwargs)

      File "/Users/easm/opt/anaconda3/lib/python3.8/site-packages/nbgrader/server_extensions/formgrader/base.py", line 117, in wrapper

        return f(self, *args, **kwargs)

      File "/Users/easm/opt/anaconda3/lib/python3.8/site-packages/nbgrader/server_extensions/formgrader/handlers.py", line 125, in get

        html, _ = self.exporter.from_filename(filename, resources=resources)

      File "/Users/easm/opt/anaconda3/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 181, in from_filename

        return self.from_file(f, resources=resources, **kw)

      File "/Users/easm/opt/anaconda3/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 199, in from_file

        return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw)

      File "/Users/easm/opt/anaconda3/lib/python3.8/site-packages/nbconvert/exporters/html.py", line 119, in from_notebook_node

        return super().from_notebook_node(nb, resources, **kw)

      File "/Users/easm/opt/anaconda3/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 384, in from_notebook_node

        output = self.template.render(nb=nb_copy, resources=resources)

      File "/Users/easm/opt/anaconda3/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 148, in template

        self._template_cached = self._load_template()

      File "/Users/easm/opt/anaconda3/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 355, in _load_template

        return self.environment.get_template(template_file)

      File "/Users/easm/opt/anaconda3/lib/python3.8/site-packages/jinja2/environment.py", line 883, in get_template

        return self._load_template(name, self.make_globals(globals))

      File "/Users/easm/opt/anaconda3/lib/python3.8/site-packages/jinja2/environment.py", line 857, in _load_template

        template = self.loader.load(self, name, globals)

      File "/Users/easm/opt/anaconda3/lib/python3.8/site-packages/jinja2/loaders.py", line 429, in load

        raise TemplateNotFound(name)

    jinja2.exceptions.TemplateNotFound: formgrade

[E 09:01:32.199 NotebookApp] {

      "Host": "localhost:8888",

      "Connection": "keep-alive",

      "Upgrade-Insecure-Requests": "1",

      "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36",

      "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",

      "Sec-Fetch-Site": "same-origin",

      "Sec-Fetch-Mode": "navigate",

      "Sec-Fetch-User": "?1",

      "Sec-Fetch-Dest": "document",

      "Referer": "http://localhost:8888/formgrader/gradebook/AOSC447_EX_01/AOSC447_EX_01",

      "Accept-Encoding": "gzip, deflate, br",

      "Accept-Language": "en-US,en;q=0.9",

      "Cookie": "_xsrf=2|27454b2b|06987c740cf037bb9dc8ccf8be5bff0a|1612893270; username-localhost-8888=\"2|1:0|10:1612965681|23:username-localhost-8888|44:OTlkMjlkYTMzNjQ4NGI1OGIwYjFkYWEyMzJlMmRkZWI=|82ff79d5a11cb4435f592525754e92c36699ea1e7cb3dc65faa4bfaef64908a4\""

    }

[E 09:01:32.199 NotebookApp] 500 GET /formgrader/submissions/19d25b86b4a749c3928aa6267c1de89d/ (::1) 126.080000ms referer=http://localhost:8888/formgrader/gradebook/AOSC447_EX_01/AOSC447_EX_01

Greg Werner

unread,
Feb 10, 2021, 2:38:43 PM2/10/21
to Chao Sun, Teaching with Jupyter Notebooks

Hey Chao, install nbconvert==5.* at the end of your setup to downgrade from nbconvert v6.x to v5.x. The nbconvert package changed how templates are managed with v6.x so some Jupyter Classic extensions broke.

 

Hope this helps!

 

Greg

--
You received this message because you are subscribed to the Google Groups "Teaching with Jupyter Notebooks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter-educat...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter-education/1a57a394-e01a-4c3e-9f66-eb563de5fca2n%40googlegroups.com.

 

Chao Sun

unread,
Feb 10, 2021, 3:18:13 PM2/10/21
to Teaching with Jupyter Notebooks
Thank you so much! You saved the day and kids' homework! 
Let me share some experience to others, I tested the nbconvert 5.x version one by one, the only workable (with nbgrader ) one is:
 nbconvert-5.6.1
 nbgrader==0.6.1



Reply all
Reply to author
Forward
0 new messages