jupyter-book icon indicating copy to clipboard operation
jupyter-book copied to clipboard

ValueError: No template sub-directly with the name 'script'... when running tutorial build

Open stefwrite opened this issue 3 years ago • 5 comments

When following the tutorial steps on macOS 12.0.1 and attempting to build content for the first time, I got a traceback with this message:

ValueError: No template sub-directory with name 'script' found in the following paths: /Users/swatson/Library/Jupyter /Users/swatson/Library/Python/3.9/share/jupyter /opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/share/jupyter /usr/local/share/jupyter /usr/share/jupyter

The build failed, and I didn't know what do to do resolve this. I've attached the log from the build run.

sphinx-err-39vy6rw3.log

stefwrite avatar Nov 12 '21 21:11 stefwrite

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

welcome[bot] avatar Nov 12 '21 21:11 welcome[bot]

I ran into the exact same error, and I happened to figure out a workaround:

ln -s  /opt/homebrew/share/jupyter ~/Library/Python/3.9/share/jupyter

I figured this out by running pip3 uninstall nbconvert and then observing that it would uninstall template files underneath /opt/homebrew/share/jupyter/nbconvert/templates/.... So then I reasoned that the /opt/homebrew/share/jupyter directory can't be found by Sphinx for some reason.

I'm not sure what the correct solution is, but this seems to work for now.

shawwn avatar Jan 28 '22 06:01 shawwn

Heya, yeh that is a strange one, that I don't have an obvious fix for. I'd note though that in https://github.com/executablebooks/MyST-NB/pull/380 I'm removing the dependency on nbconvert, so hopefully this should then no longer be an issue 🤞

chrisjsewell avatar Jan 28 '22 06:01 chrisjsewell

I'm having the same issue as @stefwrite and I tried using @shawwn 's solution but it isn't working for me. Still getting the same error. Any idea what is causing it?

sheharbano96 avatar Jun 09 '22 15:06 sheharbano96

@shawwn' suggestion didn't work directly, but ln -s /opt/homebrew/share/jupyter/nbconvert ~/Library/Jupyter did the trick for me. I searched for the templates folder to get the path. I guess the problem is related to this one?

Sibylse avatar Jun 24 '22 23:06 Sibylse