opatut/dudel

Unicode error when running sass

RalfJung opened this issue · 7 comments

I get the following error when sass is run:

[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0] mod_wsgi (pid=29081): Exception occurred processing WSGI script '$HOME/dudel/dudel.wsgi'.
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0] Traceback (most recent call last):
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "$HOME/.local/lib/python2.7/site-packages/raven/middleware.py", line 35, in __call__
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     iterable = self.application(environ, start_response)
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1506, in wsgi_app
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     response = self.make_response(self.handle_exception(e))
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1197, in handle_exception
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     return handler(e)
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "$HOME/dudel/dudel/views.py", line 1034, in error
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     return render_template("error.html", error=err), err.code
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "/usr/lib/python2.7/dist-packages/flask/templating.py", line 123, in render_template
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     context, ctx.app)
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "/usr/lib/python2.7/dist-packages/flask/templating.py", line 107, in _render
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     rv = template.render(context)
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 894, in render
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     return self.environment.handle_exception(exc_info, True)
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "$HOME/dudel/dudel/templates/error.html", line 1, in top-level template code
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     {% extends "BASE.html" %}
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "$HOME/dudel/dudel/templates/BASE.html", line 9, in top-level template code
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     {% assets "css_all" -%}
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "$HOME/.local/lib/python2.7/site-packages/webassets/ext/jinja2.py", line 186, in _render_assets
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     urls = bundle.urls()
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "$HOME/.local/lib/python2.7/site-packages/webassets/bundle.py", line 787, in urls
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     urls.extend(bundle._urls(new_ctx, extra_filters, *args, **kwargs))
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "$HOME/.local/lib/python2.7/site-packages/webassets/bundle.py", line 746, in _urls
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     *args, **kwargs)
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "$HOME/.local/lib/python2.7/site-packages/webassets/bundle.py", line 600, in _build
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     force, disable_cache=disable_cache, extra_filters=extra_filters)
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "$HOME/.local/lib/python2.7/site-packages/webassets/bundle.py", line 485, in _merge_and_apply
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     filters_to_pass_down, disable_cache=disable_cache)
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "$HOME/.local/lib/python2.7/site-packages/webassets/bundle.py", line 524, in _merge_and_apply
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     kwargs=item_data)
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "$HOME/.local/lib/python2.7/site-packages/webassets/merge.py", line 277, in apply
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     return self._wrap_cache(key, func)
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "$HOME/.local/lib/python2.7/site-packages/webassets/merge.py", line 219, in _wrap_cache
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     content = func().getvalue()
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "$HOME/.local/lib/python2.7/site-packages/webassets/merge.py", line 252, in func
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     getattr(filter, type)(data, out, **kwargs_final)
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "$HOME/.local/lib/python2.7/site-packages/webassets/filter/sass.py", line 147, in input
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     self._apply_sass(_in, out, os.path.dirname(source_path))
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   File "$HOME/.local/lib/python2.7/site-packages/webassets/filter/sass.py", line 133, in _apply_sass
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]     stderr, stdout, proc.returncode))
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0] FilterError: sass: subprocess had error: stderr=Syntax error: Invalid US-ASCII character "\\xE2"
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]         on line 44 of standard input
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0]   Use --trace for backtrace.
[Sat Mar 21 14:14:09 2015] [error] [client 91.6.237.0] , stdout=, returncode=1

This is probably related to the checkmark in dudel/static/scss/form.scss. After replacing that checkmark by \2713, the error disappeared.

Can you provide a pull request for that?

This still has to be merged into the new master, commit is 3895a42.

Sorry, was that a remark for your future self or directed at me? I'll assume the first is the case, as I don't know how to interpret this ;-)

Yes, it was a note for future me. 😄

Looking at the git, I now see :D . I'd also like to nominate this for inclusion in the next patch release (2.0.1), as it will break new deployment on at least some machines (maybe just Debian Wheezy is affected?).

Merged into release-2.0.1