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

Problem scancel'ing a job #50

Open
rcthomas opened this issue May 12, 2021 · 3 comments
Open

Problem scancel'ing a job #50

rcthomas opened this issue May 12, 2021 · 3 comments

Comments

@rcthomas
Copy link
Member

Here's the traceback:

[E 2021-05-12 07:17:50.587 SingleUserNotebookApp web:1789] Uncaught exception DELETE /user/rthomas/cori-shared-node-cpu/scancel?1620829070570 (24.6.139.138)
    HTTPServerRequest(protocol='https', host='jupyter.nersc.gov', method='DELETE', uri='/user/rthomas/cori-shared-node-cpu/scancel?1620829070570', version='HTTP/1.1', remote_ip='24.6.139.138')
    Traceback (most recent call last):
      File "/global/common/cori_cle7/software/jupyter/cori/20-12/lib/python3.8/site-packages/tornado/web.py", line 1704, in _execute
        result = await result
      File "/global/common/cori_cle7/software/jupyter/cori/20-12/lib/python3.8/site-packages/jupyterlab_slurm/slurm.py", line 48, in delete
        jobID = self.get_body_arguments('jobID')[0]
    IndexError: list index out of range
@IvanMCV
Copy link

IvanMCV commented Jul 7, 2021

Same problem here. Using JupyterLab 2.2.6 and Node.js 10.19.

@IvanMCV
Copy link

IvanMCV commented Jul 7, 2021

Well, the problem seems to be the ContentType conditional check:

if self.request.headers['Content-Type'] == 'application/json':
            jobID = json.loads(self.request.body)["jobID"]
        else:
            jobID = self.get_body_arguments('jobID')[0]

In my case the conditional takes the else path (not json) and then the cancel call fails with the "list index out of range error". But if If I remove the conditional and I just put:

jobID = json.loads(self.request.body)["jobID"]

Then it works. So it seems to be a confussion with the Content-Type here.

@mlhenderson
Copy link
Contributor

This was reworked as part of a migration to Lab 3, and the Content-Type was corrected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants