MyST-NB icon indicating copy to clipboard operation
MyST-NB copied to clipboard

mispecifying _build directory causes jupyter_execute recursion

Open phaustin opened this issue 5 years ago • 3 comments

If a user tries to render an ipynb file to html with this sphinx command:

sphinx-build -N -v -b html . _build

the jupyter_execute folder is created in _build's parent folder, and subsequent builds produce recursive copies of the contents.

Fix(?) -- error out and tell user to do

sphinx-build -N -v -b html . _build/html

or create the html directory and an information message.

phaustin avatar Apr 04 '20 16:04 phaustin

Thnaks @phaustin, yes this line https://github.com/ExecutableBookProject/MyST-NB/blob/b64cc307b38c14db469e410434895f13f63773ff/myst_nb/parser.py#L297 would be the issue then.

I'm not sure off-hand why outdir here would be pointing to _build/html by default, rather than just _build? Will look into it

chrisjsewell avatar Apr 04 '20 17:04 chrisjsewell

just had this happen to me and it is a charming bug but also +1 on seems worth fixing

sneakers-the-rat avatar Oct 20 '23 00:10 sneakers-the-rat