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
Posts without metadata make nikola fail with cryptic error. #2771
Labels
Comments
Build scripts are really not meant to be interactive. A better error message is indeed a good idea. Also, this is not really ipynb specific, I am changing the title to reflect that. |
ralsina
changed the title
.ipynb files not created or imported with
Posts without metadata make nikola fail with cryptic error.
May 17, 2017
new_post
fail on build
ralsina
pushed a commit
that referenced
this issue
May 18, 2017
That branch mentioned above changes from that ... thing to this:
|
Kwpolska
added a commit
that referenced
this issue
May 21, 2017
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
ralsina
pushed a commit
that referenced
this issue
May 21, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When building a Nikola site with the
ipynb
compiler enabled, any notebooks not created or imported usingnikola new_post
will raise aValueError
from because of the missing metadata, e.g.:ValueError: Invalid date '' in file posts/notes-on-meshgrid-ordering.ipynb
This is caused by the return of an empty dictionary in
read_metadata()
.I understand that this can be worked around with
nikola new_post -i
and creation of a separate metadata file, but the workflow I'd personally prefer when using Nikola is to author my notebooks in a way that is entirely Nikola-agnostic. Drawing inspiration from what's done for page metadata, I kludged together a solution inipynb.py
that works for my use case.After speaking with @Kwpolska a little in Freenode #python, it appears this is partially a design decision, but I think it's pretty inelegant to just propagate the
ValueError
to the user.For my workflow, my ideal user story would be:
I'm happy to maintain my own version of the ipynb compiler for my personal use, but I figured I'd find out if this is a feature that would add value to the project. If not, then at the very least it seems appropriate to point the user to the
new_post
command when this error is raised.The text was updated successfully, but these errors were encountered: