miracle2k / flask-assets

Flask webassets integration.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

webassets.exceptions.FilterError [SCSS] subprocess returned a non-success result code

smurf-U opened this issue · comments

assets_frontend_css = [
    'website/src/scss/color.scss',
    'website/src/scss/common.scss',
]
assets_bundles = {

    'assets_frontend_css': Bundle(
        *assets_frontend_css,
        output='gen/assets_frontend.css',
        filters='scss,cssmin', extra={'rel': 'stylesheet/css'}),
}
app = Flask(__name__)
assets = Environment(app)
assets.register(assets_bundles)

color.scss

$primary-color : #48b1bf;
$secondary-color: #646464;

common.scss

body{
    background: $primary-color;
    color: $secondary-color;
}

Error give as below,

webassets.exceptions.FilterError
webassets.exceptions.FilterError: scss: subprocess returned a non-success result code: 64, stdout=b'Could not find an option named "line-comments".\n\nUsage: sass <input.scss> [output.css]\n       sass <input.scss>:<output.css> <input/>:<output/> <dir/>\n\n\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81 Input and Output \xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\n    --[no-]stdin               Read the stylesheet from stdin.\n    --[no-]indented            Use the indented syntax for input from stdin.\n-I, --load-path=<PATH>         A path to use when resolving imports.\n                               May be passed multiple times.\n\n-s, --style=<NAME>             Output style.\n                               [expanded (default), compressed]\n\n    --[no-]charset             Emit a @charset or BOM for CSS with non-ASCII characters.\n                               (defaults to on)\n\n    --[no-]error-css           When an error occurs, emit a stylesheet describing it.\n                               Defaults to true when compiling to a file.\n\n    --update                   Only compile out-of-date stylesheets.\n\n\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81 Source Maps \xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\n    --[no-]source-map          Whether to generate source maps.\n                               (defaults to on)\n\n    --source-map-urls          How to link from source maps to source files.\n                               [relative (default), absolute]\n\n    --[no-]embed-sources       Embed source file contents in source maps.\n    --[no-]embed-source-map    Embed source map contents in CSS.\n\n\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81 Other \xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\n    --watch                    Watch stylesheets and recompile when they change.\n    --[no-]poll                Manually check for changes rather than using a native watcher.\n                               Only valid with --watch.\n\n    --[no-]stop-on-error       Don\'t compile more files once an error is encountered.\n-i, --interactive              Run an interactive SassScript shell.\n-c, --[no-]color               Whether to use terminal colors for messages.\n    --[no-]unicode             Whether to use Unicode characters for messages.\n-q, --[no-]quiet               Don\'t print warnings.\n    --[no-]trace               Print full Dart stack traces for exceptions.\n-h, --help                     Print this usage information.\n    --version                  Print the version of Dart Sass.\n', stderr=b''

Traceback (most recent call last)
File "/home/kaushal/.local/lib/python3.6/site-packages/flask/app.py", line 2463, in __call__
return self.wsgi_app(environ, start_response)
File "/home/kaushal/.local/lib/python3.6/site-packages/flask/app.py", line 2449, in wsgi_app
response = self.handle_exception(e)
File "/home/kaushal/.local/lib/python3.6/site-packages/flask/app.py", line 1866, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/kaushal/.local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/kaushal/.local/lib/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/home/kaushal/.local/lib/python3.6/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/kaushal/.local/lib/python3.6/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/kaushal/.local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/kaushal/.local/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/home/kaushal/.local/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/kaushal/flask_workspace/portfolio/app/website/controllers.py", line 32, in index
return render_template("index.html")
File "/home/kaushal/.local/lib/python3.6/site-packages/flask/templating.py", line 140, in render_template
ctx.app,
File "/home/kaushal/.local/lib/python3.6/site-packages/flask/templating.py", line 120, in _render
rv = template.render(context)
File "/home/kaushal/.local/lib/python3.6/site-packages/jinja2/asyncsupport.py", line 76, in render
return original_render(self, *args, **kwargs)
File "/home/kaushal/.local/lib/python3.6/site-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/home/kaushal/.local/lib/python3.6/site-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/kaushal/.local/lib/python3.6/site-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "/home/kaushal/flask_workspace/portfolio/app/website/templates/index.html", line 10, in top-level template code
{% assets "assets_frontend_css" %}
File "/home/kaushal/.local/lib/python3.6/site-packages/webassets/ext/jinja2.py", line 186, in _render_assets
urls = bundle.urls()
File "/home/kaushal/.local/lib/python3.6/site-packages/webassets/bundle.py", line 806, in urls
urls.extend(bundle._urls(new_ctx, extra_filters, *args, **kwargs))
File "/home/kaushal/.local/lib/python3.6/site-packages/webassets/bundle.py", line 765, in _urls
*args, **kwargs)
File "/home/kaushal/.local/lib/python3.6/site-packages/webassets/bundle.py", line 619, in _build
force, disable_cache=disable_cache, extra_filters=extra_filters)
File "/home/kaushal/.local/lib/python3.6/site-packages/webassets/bundle.py", line 543, in _merge_and_apply
kwargs=item_data)
File "/home/kaushal/.local/lib/python3.6/site-packages/webassets/merge.py", line 276, in apply
return self._wrap_cache(key, func)
File "/home/kaushal/.local/lib/python3.6/site-packages/webassets/merge.py", line 218, in _wrap_cache
content = func().getvalue()
File "/home/kaushal/.local/lib/python3.6/site-packages/webassets/merge.py", line 251, in func
getattr(filter, type)(data, out, **kwargs_final)
File "/home/kaushal/.local/lib/python3.6/site-packages/webassets/filter/sass.py", line 196, in input
self._apply_sass(_in, out, os.path.dirname(source_path))
File "/home/kaushal/.local/lib/python3.6/site-packages/webassets/filter/sass.py", line 190, in _apply_sass
return self.subprocess(args, out, _in, cwd=child_cwd)
File "/home/kaushal/.local/lib/python3.6/site-packages/webassets/filter/__init__.py", line 527, in subprocess
proc.returncode, stdout, stderr))
webassets.exceptions.FilterError: scss: subprocess returned a non-success result code: 64, stdout=b'Could not find an option named "line-comments".\n\nUsage: sass <input.scss> [output.css]\n sass <input.scss>:<output.css> <input/>:<output/> <dir/>\n\n\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81 Input and Output \xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\n --[no-]stdin Read the stylesheet from stdin.\n --[no-]indented Use the indented syntax for input from stdin.\n-I, --load-path=<PATH> A path to use when resolving imports.\n May be passed multiple times.\n\n-s, --style=<NAME> Output style.\n [expanded (default), compressed]\n\n --[no-]charset Emit a @charset or BOM for CSS with non-ASCII characters.\n (defaults to on)\n\n --[no-]error-css When an error occurs, emit a stylesheet describing it.\n Defaults to true when compiling to a file.\n\n --update Only compile out-of-date stylesheets.\n\n\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81 Source Maps \xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\n --[no-]source-map Whether to generate source maps.\n (defaults to on)\n\n --source-map-urls How to link from source maps to source files.\n [relative (default), absolute]\n\n --[no-]embed-sources Embed source file contents in source maps.\n --[no-]embed-source-map Embed source map contents in CSS.\n\n\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81 Other \xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\xe2\x94\x81\n --watch Watch stylesheets and recompile when they change.\n --[no-]poll Manually check for changes rather than using a native watcher.\n Only valid with --watch.\n\n --[no-]stop-on-error Don\'t compile more files once an error is encountered.\n-i, --interactive Run an interactive SassScript shell.\n-c, --[no-]color Whether to use terminal colors for messages.\n --[no-]unicode Whether to use Unicode characters for messages.\n-q, --[no-]quiet Don\'t print warnings.\n --[no-]trace Print full Dart stack traces for exceptions.\n-h, --help Print this usage information.\n --version Print the version of Dart Sass.\n', stderr=b''
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object
Brought to you by DON'T PANIC, your friendly Werkzeug powered traceback interpreter.