我最近在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,它运行良好。
请帮助,如何解决?
(如果有错误,我很抱歉,从Google翻译中做过翻译)
答案 0 :(得分:2)
我有同样的错误。我设法通过在我的WITH_FUTURE_DATES = False
中评论选项publishconf.py
来解决这个问题。
我没有进一步调查,所以我还不知道问题的确切原因。