1

我最近在 3.5.0 版上更新了 python-pelican。之后我没有工作生成。错误如下:

ERROR: Could not process linux/ssh.md
  | can't compare offset-naive and offset-aware datetimes
  |___
  | Traceback (most recent call last):
  |   File "/usr/local/lib/python2.7/dist-packages/pelican/generators.py", line 502, in generate_context
  |     context_sender=self)
  |   File "/usr/local/lib/python2.7/dist-packages/pelican/readers.py", line 492, in read_file
  |     context=context)
  |   File "/usr/local/lib/python2.7/dist-packages/pelican/contents.py", line 136, in __init__
  |     if hasattr(self, 'date') and self.date > SafeDatetime.now():
  | TypeError: can't compare offset-naive and offset-aware datetimes

我已经更新了所有插件,但无济于事。

之前的升级版本是 3.3.0,而且运行良好。

请帮忙,如何解决?

(如果有错误,我很抱歉,从谷歌翻译做的翻译)

4

1 回答 1

2

我有同样的错误。我设法通过WITH_FUTURE_DATES = False在我的publishconf.py.

我没有进一步调查,所以我还不知道问题的确切原因。

于 2014-11-27T17:19:45.613 回答