The failure is down to the way that the notebook runner works. A possible workaround: https://github.com/jupyter/jupyter_client/issues/487#issuecomment-956206611