【问题标题】:Error hyde with python-3.xpython-3.x 错误 hyde
【发布时间】:2013-03-09 17:09:36
【问题描述】:

我关注(https://github.com/hyde/hyde)并使用命令“hyde-s folder_name create -l starter”安装了所有requirements.txt,出现错误:

Traceback (most recent call last):
   File "C: \ Python33 \ Scripts \ hyde-script.py", line 9, in <module>
     load_entry_point ('== 0.8.4 hyde', 'console_scripts', 'hyde') ()
   File "C: \ Python33 \ lib \ site-packages \ hyde \ main.py", line 10, in main
     Engine (.) Run ()
   File "C: \ Python33 \ lib \ site-packages \ hyde \ engine.py", line 39, in run
     super (Engine, self). run (args)
   File "C: \ Python33 \ lib \ site-packages \ command \ application.py", line 252, in run
     self.parse args = (sys.argv [1:])
   File "C: \ Python33 \ lib \ site-packages \ command \ application.py", line 242, in parse
     self.__parser__.parse_args return () # pylint: disable-msg = E1101
AttributeError: 'Engine' object has no attribute '__parser__'

我看到安装的argparse有一个“parse_args()(http://argparse.googlecode.com/svn/trunk/doc/parse_args.html)”尝试多适配不成功。

在我不得不做一些调整之前,例如“从 UserDict 导入 IterableUserDict”,如“python 3x”中有 (http://docs.python.org/3.3/library/collections.html?highlight=userdict#collections.UserDict)。

【问题讨论】:

  • Python 3 包含argparse。这不是你的问题。您的回溯看起来很奇怪,您对文件名和self.parse_args = (sys.argv [1:]) 中的_ 做了什么?
  • 至少Typogrify 不兼容 Python 3。我怀疑这个项目需要 Python 2。
  • Hyde 是否仍在积极开发/维护?您链接的存储库上的最后一次提交可以追溯到一年前。也许您可以搜索一个从一开始就支持 Python 3 的不同静态站点生成器。

标签: python python-3.x hyde


【解决方案1】:

我测试了两个静态站点生成器,我可以说NikolaPelican 在 Python 3.3.2 中使用是最稳定的

【讨论】:

    猜你喜欢
    • 2015-02-16
    • 2012-03-20
    • 1970-01-01
    • 1970-01-01
    • 2014-04-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多