Python 如何将我的谷歌博客文件导入Pelican而不出错?
如果没有某种Python错误,我无法将Python 如何将我的谷歌博客文件导入Pelican而不出错?,python,python-3.x,pip,pelican,Python,Python 3.x,Pip,Pelican,如果没有某种Python错误,我无法将feed.atom文件格式的Blogger文件导入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: Pando
feed.atom
文件格式的Blogger文件导入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'
[root@webblog]#鹈鹕导入--feed-m MARKUP-o/var/www/blog/content//home//Blogger/Blogs/test/feed.atom
警告:Pandoc版本未知:FileNotFoundError:[Errno 2]没有这样的文件或目录:“Pandoc”:“Pandoc”
警告:未正确设置SITEURL生成的源可能无效
警告:设置中未指定时区信息。假设您的时区为UTC以生成提要。检查http://docs.getpelican.com/en/latest/settings.html#timezone 更多信息
回溯(最近一次呼叫最后一次):
文件“/usr/local/bin/pelican import”,第11行,在
sys.exit(main())
文件“/usr/local/lib/python3.7/site packages/pelican/tools/pelican_import.py”,第1019行,主文件
附件=附件或无)
文件“/usr/local/lib/python3.7/site packages/pelican/tools/pelican_import.py”,第780行,位于fields2pelican中
字段中的种类(单位标记):
feed2fields中的文件“/usr/local/lib/python3.7/site packages/pelican/tools/pelican_import.py”,第567行
如果hasattr(条目“已更新”\u已解析”),则为None(无)
AttributeError:“time.struct\u time”对象没有属性“strftime”
如果有帮助的话,我会运行一个
RedHat
衍生工具。我也不确定在调用解析我的feed.atom
blogger文件时是否应该使用--feed
或--blogger
参数。这看起来像是鹈鹕导入中的一个bugfeedparser
的日期/时间分析器,其结果是time.struct\u time
实例,而pelican可以使用.strftime()
方法导入对象
将错误报告给。该问题现已报告并修复。它将以4.0.2版发布。如果您已经需要修复,您可以克隆pelican repo并从源代码处安装。感谢您让我知道