EnigmaCurry / blogofile

A static website compiler and blog engine written in Python.
http://www.blogofile.com
Other
337 stars 86 forks source link

Contentless mako.exceptions.CompileException while trying to build a site that worked with blogofile 0.7.1 #147

Open mgedmin opened 11 years ago

mgedmin commented 11 years ago

Blogofile 0.8b1 chokes and dies on my website, which used to work fine with Blogofile 0.7.1. What's worse, the error message doesn't even tell me which file it didn't like.

To reproduce:

git clone https://github.com/mgedmin/gedmin.as
cd gedmin.as
git checkout 85b2738
make build

Here's the traceback I get:

env/bin/blogofile build -s website
ERROR:blogofile:Fatal build error occured, calling bf.config.build_exception()
Traceback (most recent call last):
  File "env/bin/blogofile", line 8, in <module>
    load_entry_point('Blogofile==0.8b1', 'console_scripts', 'blogofile')()
  File "/home/mg/src/gedmin.as/env/local/lib/python2.7/site-packages/blogofile/main.py", line 58, in main
    args.func(args)
  File "/home/mg/src/gedmin.as/env/local/lib/python2.7/site-packages/blogofile/main.py", line 388, in do_build
    writer.write_site()
  File "/home/mg/src/gedmin.as/env/local/lib/python2.7/site-packages/blogofile/writer.py", line 50, in write_site
    self.__write_files()
  File "/home/mg/src/gedmin.as/env/local/lib/python2.7/site-packages/blogofile/writer.py", line 127, in __write_files
    util.path_join(root, html_path))
  File "/home/mg/src/gedmin.as/env/local/lib/python2.7/site-packages/blogofile/template.py", line 386, in materialize_template
    template = template_engine(template_name, caller=caller, lookup=lookup)
  File "/home/mg/src/gedmin.as/env/local/lib/python2.7/site-packages/blogofile/template.py", line 116, in __init__
    lookup=self.template_lookup)
  File "/home/mg/src/gedmin.as/env/local/lib/python2.7/site-packages/mako/template.py", line 273, in __init__
    (code, module) = _compile_text(self, text, filename)
  File "/home/mg/src/gedmin.as/env/local/lib/python2.7/site-packages/mako/template.py", line 615, in _compile_text
    generate_magic_comment=template.disable_unicode)
  File "/home/mg/src/gedmin.as/env/local/lib/python2.7/site-packages/mako/template.py", line 597, in _compile
    node = lexer.parse()
  File "/home/mg/src/gedmin.as/env/local/lib/python2.7/site-packages/mako/lexer.py", line 214, in parse
    self.filename,)
  File "/home/mg/src/gedmin.as/env/local/lib/python2.7/site-packages/mako/lexer.py", line 206, in decode_raw_stream
    0, 0, filename)
mako.exceptions.CompileException: Unicode decode operation of encoding 'ascii' failed at line: 0 char: 0
make: *** [build] Error 1
iuriguilherme commented 10 years ago

Same issue of #136, #138, #141, #148 and #152