macos blogofile.template:Error rendering template: permapage.mako
smart@smarttekiMacBook-Pro ~/Sites % blogofile init mysite blog !219 blog plugin site_src files written to mysite
smart@smarttekiMacBook-Pro ~/Sites % blogofile build -s mysite !220 ERROR:blogofile.template:Error rendering template: permapage.mako
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Blogofile-0.8b1-py2.7.egg/blogofile/template.py", line 157, in render rendered = self.mako_template.render(*_self) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Mako-0.7.2-py2.7.egg/mako/template.py", line 412, in render return runtime.render(self, self.callable, args, data) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Mako-0.7.2-py2.7.egg/mako/runtime.py", line 766, in _render *_kwargs_for_callable(callable, data)) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Mako-0.7.2-py2.7.egg/mako/runtime.py", line 798, in _render_context _exec_template(inherit, lclcontext, args=args, kwargs=kwargs) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Mako-0.7.2-py2.7.egg/mako/runtime.py", line 824, in exec_template callable(context, _args, *_kwargs) File "_templates/base.mako", line 2, in render_body ${next.body()} File "_templates/site.mako", line 20, in render_body ${next.body()} File "_templates/blog/permapage.mako", line 2, in render_body <%include file="post.mako" args="post=post" /> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Mako-0.7.2-py2.7.egg/mako/runtime.py", line 693, in include_file callable(ctx, *_kwargs_for_include(callable, context._data, *_kwargs)) File "_templates/blog/post.mako", line 18, in render_body
${post.date.strftime("%B %d, %Y at %I:%M %p")} | categories: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 0: ordinal not in range(128)
ERROR:blogofile:Fatal build error occured, calling bf.config.build_exception()
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/blogofile", line 9, in
Before running blogofile build, set the language with export LANG=en_US.UTF-8 (or export LANG=C)
@crayxt I have the same issue and the LANG envvar is properly set (in my case it's pt_BR.UTF-8).
Same issue of #136, #138, #141, #147 and #152
@iuriguilherme I meant always set language to en_US.UTF-8 or C, sorry for being unclear
@crayxt I have got your point already. Here is what I have:
$ export LANG=C; blogofile build
Traceback (most recent call last):
File "/usr/lib/python2.6/logging/__init__.py", line 799, in emit
stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 78: ordinal not in range(128)
Traceback (most recent call last):
File "/usr/local/bin/blogofile", line 9, in <module>
load_entry_point('Blogofile==0.7.1', 'console_scripts', 'blogofile')()
File "/usr/local/lib/python2.6/dist-packages/blogofile/main.py", line 135, in main
args.func(args)
File "/usr/local/lib/python2.6/dist-packages/blogofile/main.py", line 201, in do_build
writer.write_site()
File "/usr/local/lib/python2.6/dist-packages/blogofile/writer.py", line 52, in write_site
self.__run_controllers()
File "/usr/local/lib/python2.6/dist-packages/blogofile/writer.py", line 136, in __run_controllers
controller.run_all()
File "/usr/local/lib/python2.6/dist-packages/blogofile/controller.py", line 203, in run_all
controller.run()
File "_controllers/blog/__init__.py", line 25, in run
blog.posts = post.parse_posts("_posts")
File "_controllers/blog/post.py", line 328, in parse_posts
src = open(post_path, "r").read().decode(
UnicodeEncodeError: 'ascii' codec can't encode characters in position 37-39: ordinal not in range(128)
Same result with
$ export LANG=C && blogofile build
@iuriguilherme sorry for confusion. I have migrated to other static blog generator since then, cannot help.