如果没有某种Python错误,我无法将我的Blogger文件以feed.atom
文件格式导入Pelican。我安装了BeautifulSoup4
、lxml
、feedparser
和pandoc
,但不断出现以下错误:
[root@web blog]# pelican-import --feed -m MARKUP -o /var/www/blog/content/ /home/<user>/Blogger/Blogs/test/feed.atom
WARNING: Pandoc version unknown: FileNotFoundError: [Errno 2] No such file or directory: 'pandoc': 'pandoc'
WARNING: Feeds generated without SITEURL set properly may not be valid
WARNING: No timezone information specified in the settings. Assuming your timezone is UTC for feed generation. Check http://docs.getpelican.com/en/latest/settings.html#timezone for more information
Traceback (most recent call last):
File "/usr/local/bin/pelican-import", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/pelican/tools/pelican_import.py", line 1019, in main
attachments=attachments or None)
File "/usr/local/lib/python3.7/site-packages/pelican/tools/pelican_import.py", line 780, in fields2pelican
kind, in_markup) in fields:
File "/usr/local/lib/python3.7/site-packages/pelican/tools/pelican_import.py", line 567, in feed2fields
if hasattr(entry, 'updated_parsed') else None)
AttributeError: 'time.struct_time' object has no attribute 'strftime'
我运行一个RedHat
导数如果有帮助的话。我也不确定在调用解析我的feed.atom
Blogger文件时是否应该使用--feed
或--blogger
参数。你知道吗
这似乎是
pelican-import
中的一个bug。feedparser
的日期/时间解析器returns是time.struct_time
实例的datetime.utctimetuple()的结果,而pelican-import
expects是具有.strftime()
方法的对象。你知道吗将错误报告给the Pelican tracker。你知道吗
相关问题 更多 >
编程相关推荐