Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3.4 generate失败 #54

Closed
Xuanwo opened this issue Feb 5, 2016 · 4 comments
Closed

Python3.4 generate失败 #54

Xuanwo opened this issue Feb 5, 2016 · 4 comments

Comments

@Xuanwo
Copy link
Contributor

Xuanwo commented Feb 5, 2016

详情可以参见: https://travis-ci.org/Xuanwo/CLIWiki/builds/107248176

下面为对应的 Traceback

Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.4.2/bin/simiki", line 9, in <module>
    load_entry_point('simiki==1.5.0.post1', 'console_scripts', 'simiki')()
  File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/simiki/cli.py", line 419, in main
    generator.generate()
  File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/simiki/cli.py", line 238, in generate
    self.generate_catalog(self.pages)
  File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/simiki/cli.py", line 270, in generate_catalog
    html = catalog_generator.generate_catalog_html()
  File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/simiki/generators.py", line 293, in generate_catalog_html
    html = self.env.get_template("index.html").render(tpl_vars)
  File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/jinja2/environment.py", line 969, in render
    return self.environment.handle_exception(exc_info, True)
  File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/jinja2/environment.py", line 742, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/jinja2/_compat.py", line 36, in reraise
    raise value.with_traceback(tb)
  File "/home/travis/build/Xuanwo/CLIWiki/themes/yasimple/index.html", line 1, in <module>
    {% extends "base.html" %}
  File "/home/travis/build/Xuanwo/CLIWiki/themes/yasimple/base.html", line 24, in <module>
    {% block container %}
  File "/home/travis/build/Xuanwo/CLIWiki/themes/yasimple/index.html", line 12, in <module>
    {% for category_name, pages in site.structure.iteritems() %}
jinja2.exceptions.UndefinedError: 'collections.OrderedDict object' has no attribute 'iteritems'
@tankywoo
Copy link
Owner

tankywoo commented Feb 5, 2016

Python 3.x 没有 iteritems,只有 items,如果使用的是默认主题,可以执行下面的命令更新主题:

simiki update

如果是其它主题,可以手动改为items

可以参考 Issue #50

@Xuanwo
Copy link
Contributor Author

Xuanwo commented Feb 5, 2016

啊,没注意看issue,重复提交了,抱歉~

@Xuanwo Xuanwo closed this as completed Feb 5, 2016
@tankywoo
Copy link
Owner

tankywoo commented Feb 5, 2016

@Xuanwo 有问题欢迎随时提Issue 😄

@Xuanwo
Copy link
Contributor Author

Xuanwo commented Feb 5, 2016

👍 , 肯定会的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants