【问题标题】:fast-import crash: Invalid raw date快速导入崩溃:原始日期无效
【发布时间】:2019-12-11 12:37:26
【问题描述】:

我正在尝试使用ghp-import 工具导入主分支,但我不断收到IOError: [Errno 22] Invalid argument

崩溃报告说

致命:原始日期“1576064213 India Standard Time”无效,标识为:Rabbani 1576064213 India Standard Time

此外,我尝试导入的文件是由 pelican 使用命令创建的

pelican content

Pelican 是一个用于生成静态站点的 python 框架。帖子的元数据包括日期为

Date: 2019-12-11 20:00

我运行了命令

ghp-import output -b master

导致上述错误。

【问题讨论】:

    标签: python-3.x git github-pages pelican


    【解决方案1】:

    在 ghp-import 存储库中有一个与此相关的问题:link

    该票证中发现的根本问题是 Python 2 time.strftime() 函数与 Python 3 的 time.strftime() 不共享相同的格式字符串,从而导致日期格式错误。

    您使用的是哪个版本的 Python?请包括这两个命令的输出:

    python --version
    python -c 'import pelican; print(pelican.__version__)
    

    如果可能的话,我建议使用 Python 3(此处为 3.6)设置虚拟环境:

    virtualenv -p python3.6 vp && source vp/bin/activate
    

    那么您将使用 Python 3,问题应该得到解决。

    【讨论】:

      猜你喜欢
      • 2023-03-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多