python-找不到有关’NameError:date’的信息
作者:互联网
我正在为我的博客使用pelican静态站点生成器,我使用正确,但是奇怪的是我发现.md文章未编译,并引发了这些奇怪的错误.
我看了看我的文章页面,一切都很好,这是我的文章标题
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'
这些是鹈鹕在尝试撰写文章时抛出的错误.
(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.
解决方法:
您的.md文件很好.您从内容中的.html文件中获取错误,这看起来像以前的鹈鹕运行的输出:
ERROR: Skipping blog/output/tags.html: could not find information about 'NameError: date'
删除内容文件夹中的blog / output文件夹,错误应该消失了.
标签:python-3-4,python-2-7,pelican,python 来源: https://codeday.me/bug/20191119/2033925.html