diff --git a/src/sage_docbuild/conf.py b/src/sage_docbuild/conf.py index 88cd836b52c..82090e37db2 100644 --- a/src/sage_docbuild/conf.py +++ b/src/sage_docbuild/conf.py @@ -21,6 +21,7 @@ import sys import os import re +import shutil import importlib import dateutil.parser import sphinx @@ -927,7 +928,8 @@ def clean_jupyter_execute(app, exception): for debugging and hence we don't remove it. """ if exception is None: # only proceed if there were no build errors - jupyter_execute_path = os.path.join(app.outdir, 'jupyter_execute') + # path according to jupyter_sphinx.utils.output_directory + jupyter_execute_path = os.path.join(app.outdir, os.path.pardir, 'jupyter_execute') if os.path.exists(jupyter_execute_path): shutil.rmtree(jupyter_execute_path)