如何将我的googleblogger文件导入Pelican而不出错?

2024-05-19 03:41:50 发布

您现在位置:Python中文网/ 问答频道 /正文

如果没有某种Python错误,我无法将我的Blogger文件以feed.atom文件格式导入Pelican。我安装了BeautifulSoup4lxmlfeedparserpandoc,但不断出现以下错误:

[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.atomBlogger文件时是否应该使用--feed--blogger参数。你知道吗


Tags: inimportlibpackagesusrlocalfeedline
1条回答
网友
1楼 · 发布于 2024-05-19 03:41:50

这似乎是pelican-import中的一个bug。feedparser的日期/时间解析器returnstime.struct_time实例的datetime.utctimetuple()的结果,而pelican-importexpects是具有.strftime()方法的对象。你知道吗

将错误报告给the Pelican tracker。你知道吗

相关问题 更多 >

    热门问题