question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Formgrader error when trying to manually grade a specific submission: "Sorry, the formgrader encountered an error. Please contact the administrator of the formgrader for further assistance. "

See original GitHub issue

Operating system

Ubuntu 20.04.1 LTS

nbgrader --version

0.6.1

jupyterhub --version (if used with JupyterHub)

1.0.0

(I’m getting a weird error when typing this:

future: <Task finished coro=<JupyterHub.launch_instance_async() done, defined at /opt/tljh/user/lib/python3.7/site-packages/jupyterhub/app.py:2477> exception=SystemExit(0)>
Traceback (most recent call last):
  File "/opt/tljh/user/lib/python3.7/site-packages/jupyterhub/app.py", line 2492, in launch_instance
    loop.start()
  File "/opt/tljh/user/lib/python3.7/site-packages/tornado/platform/asyncio.py", line 132, in start
    self.asyncio_loop.run_forever()
  File "/opt/tljh/user/lib/python3.7/asyncio/base_events.py", line 539, in run_forever
    self._run_once()
  File "/opt/tljh/user/lib/python3.7/asyncio/base_events.py", line 1775, in _run_once
    handle._run()
  File "/opt/tljh/user/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/opt/tljh/user/lib/python3.7/site-packages/jupyterhub/app.py", line 2479, in launch_instance_async
    await self.initialize(argv)
  File "/opt/tljh/user/lib/python3.7/site-packages/jupyterhub/app.py", line 2085, in initialize
    super().initialize(*args, **kwargs)
  File "/opt/tljh/user/lib/python3.7/site-packages/traitlets/config/application.py", line 86, in inner
    return method(app, *args, **kwargs)
  File "/opt/tljh/user/lib/python3.7/site-packages/traitlets/config/application.py", line 326, in initialize
    self.parse_command_line(argv)
  File "/opt/tljh/user/lib/python3.7/site-packages/traitlets/config/application.py", line 86, in inner
    return method(app, *args, **kwargs)
  File "/opt/tljh/user/lib/python3.7/site-packages/traitlets/config/application.py", line 693, in parse_command_line
    self.exit(0)
  File "/opt/tljh/user/lib/python3.7/site-packages/traitlets/config/application.py", line 827, in exit
    sys.exit(exit_status)
SystemExit: 0

jupyter notebook --version

6.0.3

Expected behavior

Be able to manually grade the submissions when clicking on the submission id in the formgrader/gradebook tab.

Actual behavior

Page is displaying the error “Sorry, the formgrader encountered an error. Please contact the administrator of the formgrader for further assistance.”

Steps to reproduce the behavior

It’s the first time since I installed it this year that I tried to manually grade assignments and it diplays this error. I autograded the assignments from the command line, then clicked on the Formgrader tab, then Manual Grading tab, then on the Assignment ID, Notebook ID, and when I try to access any specific submission, I get the previous error.

Here is a part of my journalctl log that contains the error:

Sep 29 06:07:05 yahoocluster-7 bash[67034]:     HTTPServerRequest(protocol='https', host='clusterinfo.unineuchatel.ch:10002', method='GET', uri='/user/hayezl/formgrader/submissions/788073b4>
Sep 29 06:07:05 yahoocluster-7 bash[67034]:     Traceback (most recent call last):
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       File "/opt/tljh/user/lib/python3.7/site-packages/tornado/web.py", line 1590, in _execute
Sep 29 06:07:05 yahoocluster-7 bash[67034]:         result = method(*self.path_args, **self.path_kwargs)
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       File "/opt/tljh/user/lib/python3.7/site-packages/tornado/web.py", line 3006, in wrapper
Sep 29 06:07:05 yahoocluster-7 bash[67034]:         return method(self, *args, **kwargs)
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       File "/opt/tljh/user/lib/python3.7/site-packages/nbgrader/server_extensions/formgrader/base.py", line 108, in wrapper
Sep 29 06:07:05 yahoocluster-7 bash[67034]:         return f(self, *args, **kwargs)
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       File "/opt/tljh/user/lib/python3.7/site-packages/nbgrader/server_extensions/formgrader/base.py", line 117, in wrapper
Sep 29 06:07:05 yahoocluster-7 bash[67034]:         return f(self, *args, **kwargs)
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       File "/opt/tljh/user/lib/python3.7/site-packages/nbgrader/server_extensions/formgrader/handlers.py", line 125, in get
Sep 29 06:07:05 yahoocluster-7 bash[67034]:         html, _ = self.exporter.from_filename(filename, resources=resources)
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       File "/opt/tljh/user/lib/python3.7/site-packages/nbconvert/exporters/exporter.py", line 182, in from_filename
Sep 29 06:07:05 yahoocluster-7 bash[67034]:         return self.from_file(f, resources=resources, **kw)
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       File "/opt/tljh/user/lib/python3.7/site-packages/nbconvert/exporters/exporter.py", line 200, in from_file
Sep 29 06:07:05 yahoocluster-7 bash[67034]:         return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw)
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       File "/opt/tljh/user/lib/python3.7/site-packages/nbconvert/exporters/html.py", line 122, in from_notebook_node
Sep 29 06:07:05 yahoocluster-7 bash[67034]:         return super().from_notebook_node(nb, resources, **kw)
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       File "/opt/tljh/user/lib/python3.7/site-packages/nbconvert/exporters/templateexporter.py", line 382, in from_notebook_node
Sep 29 06:07:05 yahoocluster-7 bash[67034]:         output = self.template.render(nb=nb_copy, resources=resources)
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       File "/opt/tljh/user/lib/python3.7/site-packages/nbconvert/exporters/templateexporter.py", line 143, in template
Sep 29 06:07:05 yahoocluster-7 bash[67034]:         self._template_cached = self._load_template()
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       File "/opt/tljh/user/lib/python3.7/site-packages/nbconvert/exporters/templateexporter.py", line 353, in _load_template
Sep 29 06:07:05 yahoocluster-7 bash[67034]:         return self.environment.get_template(template_file)
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       File "/opt/tljh/user/lib/python3.7/site-packages/jinja2/environment.py", line 883, in get_template
Sep 29 06:07:05 yahoocluster-7 bash[67034]:         return self._load_template(name, self.make_globals(globals))
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       File "/opt/tljh/user/lib/python3.7/site-packages/jinja2/environment.py", line 857, in _load_template
Sep 29 06:07:05 yahoocluster-7 bash[67034]:         template = self.loader.load(self, name, globals)
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       File "/opt/tljh/user/lib/python3.7/site-packages/jinja2/loaders.py", line 429, in load
Sep 29 06:07:05 yahoocluster-7 bash[67034]:         raise TemplateNotFound(name)
Sep 29 06:07:05 yahoocluster-7 bash[67034]:     jinja2.exceptions.TemplateNotFound: formgrade
Sep 29 06:07:05 yahoocluster-7 bash[67034]: [E 2020-09-29 06:07:05.479 SingleUserNotebookApp log:166] {
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       "Host": "clusterinfo.unineuchatel.ch:10002",
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0",
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       "Accept-Encoding": "gzip, deflate, br",
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       "Accept-Language": "fr-CH,en-US;q=0.7,en;q=0.3",
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       "Cookie": "jupyterhub-user-hayezl=[secret]; _xsrf=[secret]; jupyterhub-session-id=[secret]",
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       "Referer": "https://clusterinfo.unineuchatel.ch:10002/user/hayezl/formgrader/gradebook/Serie1/Fourier2021_serie1",
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       "Upgrade-Insecure-Requests": "1",
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       "X-Forwarded-For": "51.154.36.71, 192.168.128.1",
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       "X-Forwarded-Host": "clusterinfo.unineuchatel.ch:10002",
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       "X-Forwarded-Port": "10002",
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       "X-Forwarded-Proto": "https",
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       "X-Forwarded-Server": "yahoocluster-7",
Sep 29 06:07:05 yahoocluster-7 bash[67034]:       "X-Real-Ip": "192.168.128.1"
Sep 29 06:07:05 yahoocluster-7 bash[67034]:     }
Sep 29 06:07:05 yahoocluster-7 bash[67034]: [E 2020-09-29 06:07:05.479 SingleUserNotebookApp log:174] 500 GET /user/hayezl/formgrader/submissions/788073b4944d43b09f2b9e449127dd3d/ (hayezl@1>

Thanks for any help regarding this issue.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

11reactions
LaurentHayezcommented, Oct 2, 2020

Thank you for your replies.

I tried to tingle with @gzagatti 's suggestion of modifying the variable names as well as the extension files, but I did not manage to make it work that way.

Solution that works

As suggested by @perllaghu and @ZXia221 , downgrading nbconvert to version 5.6.1 solves the issue (so far, I can open a specific submission, I did not try to generate and release feeback to the stutents yet).

On jupyterhub, one can simply open a terminal and type

sudo -E pip uninstall nbconvert
sudo -E pip install --upgrade nbconvert==5.6.1
2reactions
astrawcommented, Jul 6, 2021

I seem to have solved this problem for myself (with nbgrader 0.6.1) by reverting to nbconvert 5.6.

Nearly simultaneously, I also reverted to sqlalchemy=1.3 (from 1.4.x) and jinja2=2.11 (from 3.x) which may have also played a role. The sqlalchemy reversion seemed necessary to solve another issue I was having. I’m not sure if the jinja2 reversion was really needed for anything, but I did it before reverting nbconvert.

I note that there is ongoing work to upgrade to nbconvert 6 https://github.com/jupyter/nbgrader/pull/1421 but I am using nbgrader 0.6.1 and didn’t want to change it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

manual grading error - Google Groups
... for the manual grading portion: "Sorry, the formgrader encountered an error. Please contact the administrator of the formgrader for further assistance.".
Read more >
Instructors - E2X H-BRS
The grading servers have nbgrader , nbassignment and other e2x software to ... directory is to open the Formgrader tab and press “Add...
Read more >
- Datahub/DSMLP Grading Tool - nbgrader - Services & Support
nbgrader is a tool for Jupyter notebooks that allows instructors to create, distribute, and grade assignments through the Jupyter notebook interface (Formgrader) ...
Read more >
nbgrader A Tool for Creating and Grading Assignments in the ...
As usage of the Jupyter notebook in scientific computing becomes increasingly ubiquitous, so too does its presence in classrooms.
Read more >
Nbgrader notes - Earlham CS Department
In the formgrader, choose “Manual Grading” on the left. Then, select the labs and assignments you wish to manually grade. You can also...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found