Could not find information about 'NameError: date'
Could not find information about 'NameError: date'
我正在为我的博客使用 pelican 静态站点生成器,我使用正确,但奇怪的是我发现 .md
文章没有编译,它抛出了这些奇怪的错误。
我看了我的文章页面,一切正常,这是我的文章header
Title: some title
slug: some-title
Date: 2016-11-19
Category: code
Tags: python, python
Authors: nix1947(Manoj)
我找不到,为什么会出现这个错误?
我查看了 pelicanconf.py
文件,特别是日期部分,一切正常
这是我的 pelicanconf.py 文件
的日期部分
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'
这些是当我尝试编译一篇文章时 pelican 抛出的一堆错误。
(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.
为了构造 URL,它试图访问日期字段,但您没有提到那些 URL 的日期,这就是错误的原因。
PS :
这应该是评论而不是答案,但我没有足够的声誉所以在这里添加它。
您的 .md
文件没有问题。您的 content
中的 .html
文件出现错误,这看起来像之前 pelican
运行:
的输出
ERROR: Skipping blog/output/tags.html: could not find information about 'NameError: date'
删除 content
文件夹中的 blog/output
文件夹,错误应该会消失。
我正在为我的博客使用 pelican 静态站点生成器,我使用正确,但奇怪的是我发现 .md
文章没有编译,它抛出了这些奇怪的错误。
我看了我的文章页面,一切正常,这是我的文章header
Title: some title
slug: some-title
Date: 2016-11-19
Category: code
Tags: python, python
Authors: nix1947(Manoj)
我找不到,为什么会出现这个错误?
我查看了 pelicanconf.py
文件,特别是日期部分,一切正常
这是我的 pelicanconf.py 文件
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'
这些是当我尝试编译一篇文章时 pelican 抛出的一堆错误。
(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.
为了构造 URL,它试图访问日期字段,但您没有提到那些 URL 的日期,这就是错误的原因。
PS : 这应该是评论而不是答案,但我没有足够的声誉所以在这里添加它。
您的 .md
文件没有问题。您的 content
中的 .html
文件出现错误,这看起来像之前 pelican
运行:
ERROR: Skipping blog/output/tags.html: could not find information about 'NameError: date'
删除 content
文件夹中的 blog/output
文件夹,错误应该会消失。