nbgrader
nbgrader copied to clipboard
TimeoutError: Timeout waiting for IOPub output
Operating system
Windows 10
nbgrader --version
0.6.0
Expected behavior
The command nbgrader autograde --force "Homework XX" --student abc123 should work for well-formed notebooks.
Actual behavior
About ~20% of the time it fails with TimeoutError: Timeout waiting for IOPub output Running the same notebooks with the web interface works about 50% of the time. If I keep trying it works eventually.
Steps to reproduce the behavior
Run enough notebooks. I searched for the issue but couldn't find anything under open issues. Is it just me?
Could you share a notebook that this happens with?
It's not consistent with any particular notebook. What I've since found is that setting my PC's power mode to "Best Performance" (on Windows 10) makes the issue completely disappear.
It might have something to do with how the timeout is calculated. It's not just that it takes too long. When it does fail, it usually does it within a few seconds.
for info, catched this zmq timeout on conda-forge OSX CI platform
Probably due to an unresponsive OS.
It's not consistent with any particular notebook. What I've since found is that setting my PC's power mode to "Best Performance" (on Windows 10) makes the issue completely disappear.
Can confirm, at least for the Validate function. For a grading notebook I am working on, I will sometimes receive the IOPub timeout error described by the OP, while other times I would receive NameError: <variable name> not found on variables defined earlier in the notebook. Everything works correctly (without error) when I 'Run All' cells.
After I simply plugged in my laptop, the Validate errors stopped. (I assume Best Performance is enabled automatically.)
I also run into the issue Timeout waiting for IOPub output for some of my student submissions. I haven't looked into it in enough detail to find out what is causing it. It occured with student submissins that generated a lot of outputs (plots, print statements, etc.). It might be related, but it could also be a coincidence.
I also run into the issue Timeout waiting for IOPub output for some of my student submissions. I haven't looked into it in enough detail to find out what is causing it. It occured with student submissins that generated a lot of outputs (plots, print statements, etc.). It might be related, but it could also be a coincidence.
@RonaldEnsing Dear CoR colleague, have you found a solution to this problem? I am encountering this issue for computational expensive cells. However, I am struggling of increasing the timeout.
No, I haven't looked any further into this.
No, I haven't looked any further into this.
I actually fixed it last night. In case you encounter the same / a similar issue in the future again:
Opposite to the official documentation, setting c.ExecutePreprocessor.timeout = 60 in the nbgrader_config.py file doesn't seem to have any effect and the timeout remains at 30s. What helps instead, is adding a line c.Execute.timeout = 60 # s to the config.