openedx / openedx/xqueue-watcher

Grade.py configuration not working

Open
#33 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
18
Forks
44
PR merge metrics
No merged PRs in 30d

Description

https://github.com/edx/xqueue-watcher/blob/2a17af2bd66ee0f4ffae3147585118ac3cb868d7/conf.d/600.json#L11

Hi, I'm working on a course where we've created a custom grade.py file which we'd like to use. Unfortunately we tried adding the gradepy kwarg, however the xqwatcher service failed to start with the following error:

2018-05-29 17:59:26,213 - manager.py:128 -- enable_codejail [INFO]: configured codejail -> mit-686x /edx/app/xqwatcher/venvs/mit-686x/bin/python mit-686x
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/edx/app/xqwatcher/src/xqueue_watcher/__main__.py", line 4, in <module>
    sys.exit(main())
  File "xqueue_watcher/manager.py", line 187, in main
    manager.configure_from_directory(args.config_root)
  File "xqueue_watcher/manager.py", line 102, in configure_from_directory
    self.configure(json.load(queue_config))
  File "xqueue_watcher/manager.py", line 77, in configure
    watcher = self.client_from_config(queue_name, config)
  File "xqueue_watcher/manager.py", line 67, in client_from_config
    handler = handler(**kw)
  File "xqueue_watcher/jailedgrader.py", line 67, in __init__
    super(JailedGrader, self).__init__(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'gradepy'

Is there a new way to specify where the grade.py file is ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with conf.d/600.json and trace xqueue_watcher/manager.py, especially client_from_config, into xqueue_watcher/jailedgrader.py. Confirm how configuration kwargs reach JailedGrader and determine how a custom grade.py path should be specified. Done means the service accepts the configuration and uses the requested grade.py without the startup error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.