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.

c.ExecutePreprocessor.timeout does not work in config

See original GitHub issue

Operating system

Windows 10

nbgrader --version

0.6.2

jupyterhub --version (if used with JupyterHub)

Nil

jupyter notebook --version

6.3.0

Expected behavior

Setting c.ExecutePreprocessor.timeout in config should change validation timeout window

Actual behavior

Setting c.ExecutePreprocessor.timeout to None or another other number has no effect on the default 30s

Additional info

I have looked at both issues #1004 and #1075 but nothing works

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
wkirgsncommented, May 24, 2022

I managed to set the timeout to 600s via nbgrader validate --Execute.timeout=600 and in the config file via c.Execute.timeout = 600.

See also

# nbgrader --help-all | grep -A16 Execute.timeout=
--Execute.timeout=<Int>
    Default: 30
    The time to wait (in seconds) for output from executions. If a cell
    execution takes longer, an exception (TimeoutError on python 3+,
    RuntimeError on python 2) is raised.
    `None` or `-1` will disable the timeout. If `timeout_func` is set, it
    overrides `timeout`.
--Execute.timeout_func=<Any>
    Default: None
    A callable which, when given the cell source as input, returns the time to
    wait (in seconds) for output from cell executions. If a cell execution takes
    longer, an exception (TimeoutError on python 3+, RuntimeError on python 2)
    is raised.
    Returning `None` or `-1` will disable the timeout for the cell. Not setting
    `timeout_func` will cause the preprocessor to default to using the `timeout`
    trait for all cells. The `timeout_func` trait overrides `timeout` if it is
    not `None`.

FYI @RonaldEnsing Pingback #1004 #1075

Neither of both suggestions works for me, there will be always the warning that config option “timeout” not recognized by “Execute” with the latest pypi release 0.7.0, and cells can only run for 30 seconds.

2reactions
davidnerocommented, Sep 28, 2022

c.Execute.timeout_func = lambda x: 500 can be used as a work-around in 0.7.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Timeout when running iPython nbconvert from command line
For anyone else facing this error with a correct path, I was able to extend the timeout using the flag --ExecutePreprocessor.timeout=300.
Read more >
Python Tool - Timeout waiting for execute reply (30s)
1. Open a command prompt (cmd.exe) · 2. Enter the following 2 lines: if not exist %userprofile%\.jupyter mkdir %userprofile%\.jupyter echo c.
Read more >
Configuration options — nbconvert 7.2.7 documentation
This generally doesn't need to be set, but on some slow networks (such as CI systems) the default timeout might not be long...
Read more >
Preventing Jupyter timeout errors when running notebooks as ...
If you are running a recent Jupyter version and the above commands do not work, use this instead: echo "c.ExecutePreprocessor.timeout ...
Read more >
nbconvert Documentation - Read the Docs
(specifically, speaker notes & timers) will not work on website ... jupyter nbconvert --ExecutePreprocessor.timeout=600 --to notebook ...
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