Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nbconvert 6 and jinja2.exceptions.TemplateNotFound: static/style.css #3457

Closed
shahinrostami opened this issue Sep 13, 2020 · 4 comments
Closed
Assignees
Labels
Milestone

Comments

@shahinrostami
Copy link

shahinrostami commented Sep 13, 2020

Environment

Python Version: 3.8.5, 3.7.9

Nikola Version: 8.1.1 and 8.0.4

Operating System: Windows 10, WSL2 (running through miniconda on ubuntu)

Description:

Hello - I'd like to raise this issue unless it's been resolved since 8.1.1 (current version on PyPI).

When running nikola build or nikola build -a with all cache deleted, the following error comes up when starting to process .ipynb posts:

jinja2.exceptions.TemplateNotFound: static/style.css

This worked for me prior to a system factory reset and reinstallation of software, so I started downgrading to versions I knew worked, e.g. python 3.8.5 to 3.7.9 and Nikola 8.1.1 to 8.0.4 in hopes of a quick fix. I couldn't find much through a web search, most of it referred to Flask.

I was checking the versions of Jinja2 and nbconvert in hopes of finding something there, and I noticed that nbconvert was at 6.0.2. I downgraded it to a version I knew worked, 5.6.1, and everything is running smoothly again!

@Kwpolska
Copy link
Member

nbconvert broke compatibility with the template names we used in v6, and the changes aren’t fully documented (see jupyter/nbconvert#1384). I created PR #3458 with a fix, please test.

@shahinrostami
Copy link
Author

nbconvert broke compatibility with the template names we used in v6, and the changes aren’t fully documented (see jupyter/nbconvert#1384). I created PR #3458 with a fix, please test.

Tested and confirmed. Great work - thank you.

@mattnicholson38
Copy link

Hi,

I'm certainly a newbie, but I don't think this bug is completely fixed. I get a very similar error almost out of the box running the nikola demo site configured to add .ipynb posts:

jinja2.exceptions.TemplateNotFound: basic.tpl

Downgrading to nbconvert 5.6.1 as suggested above solved the problem. Pretty painful for a newbie, but did get me to install Ubuntu (thinking it was a Windows thing, ha)

Python Version: 3.8.5
Nikola Version: 8.1.1
Operating Systems: Windows 10 and Ubuntu under VirtualBox (identical results)

@Kwpolska
Copy link
Member

Kwpolska commented Nov 6, 2020

Hi @mattnicholson38!

This bug was fixed, and the fix was committed to this repository. However, there has been no release of Nikola since then. Installing Nikola with pip install Nikola will still install v8.1.1, which has the bug. You can install the git version or manually patch ipynb.py with the fixes in PR #3458.

(A new release is probably overdue, I will try to allocate some time to work on that and a few outstanding issues soon.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants