Manoj Gautam Manoj Gautam - 5 months ago 10
Python Question

Could not find information about 'NameError: date'

I am working with pelican static site generator for my blog, I was using correctly, but strangely I found that

.md
articles are not compiling and it throws me these strange errors.

I looked at my article pages, everything is fine, this is my article header

Title: some title
slug: some-title
Date: 2016-11-19
Category: code
Tags: python, python
Authors: nix1947(Manoj)


I couldn't find, why I am getting this error?

I looked over the
pelicanconf.py
file, particularly for the date section, everything is ok
here is my date section of my pelicanconf.py file

DATE_FORMAT = { 'en': '%d %m %Y'}
DEFAULT_DATE_FORMAT = '%d %m %Y'
PDF_GENERATOR = False
REVERSE_CATEGORY_ORDER = True
ARTICLE_URL = '{date:%Y}/{date:%-m}/{date:%-d}/{slug}/'
ARTICLE_SAVE_AS = ARTICLE_URL + 'index.html'


These are the bunch of errors that pelican throws when I try to compile an article.

(nix1947blog)nix1947@nix1947:~/projects/nix1947blog/content/blog$
-> Modified: content. re-generating...
ERROR: Skipping blog/output/tags.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/categories.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/archives.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/Updating-linux-packages-from-particular-repositories.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/heroku-rails-cheatsheet.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/Data structures and algorithms using python.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/rails-5-cheatsheet.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/authors.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/index.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/Web-scraping-using-python-3.5.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/hello-world.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/installing-latex-in-linux.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/author/nix1947.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/author/nix1947manoj-gautam.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/category/sysadmin.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/category/code.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/category/documentation.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/ruby.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/linux.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/python.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/programming.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/documentation.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/system-admininstration.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/rails.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/publishing.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/blog.html: could not find information about 'NameError: date'
ERROR: Skipping blog/output/tag/heroku.html: could not find information about 'NameError: date'
Done: Processed 6 articles, 0 drafts, 0 pages and 0 hidden pages in 0.32 seconds.

Answer

Your .md files are fine. You're getting errors from .html files in your content, which looks like the output of a previous pelican run:

ERROR: Skipping blog/output/tags.html: could not find information about 'NameError: date'

Remove the blog/output folder inside your content folder and the errors should go away.

Comments