skip to Main Content

I was editing an open source Flask app – it was working just fine. I changed 1 thing in .scss file and the entire application fails to load.

I undid all the changes but nothing changes. I can no longer start my application.

Every time I run honcho start -f Local and navigate to localhost:5000/

I get this error webassets.exceptions.FilterError: Program file not found: sass

Here is a copy of the trace on my terminal

(venv) pcowe@Pauls-MacBook-Pro maps4all % honcho start -f Local
22:33:06 system   | web.1 started (pid=71020)
22:33:06 system   | redis.1 started (pid=71019)
22:33:06 system   | worker.1 started (pid=71021)
22:33:06 redis.1  | 71019:C 12 Aug 2020 22:33:06.639 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
22:33:06 redis.1  | 71019:C 12 Aug 2020 22:33:06.639 # Redis version=6.0.1, bits=64, commit=00000000, modified=0, pid=71019, just started
22:33:06 redis.1  | 71019:C 12 Aug 2020 22:33:06.639 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
22:33:06 redis.1  | 71019:M 12 Aug 2020 22:33:06.640 * Increased maximum number of open files to 10032 (it was originally set to 2560).
22:33:06 redis.1  | 71019:M 12 Aug 2020 22:33:06.642 * Running mode=standalone, port=6379.
22:33:06 redis.1  | 71019:M 12 Aug 2020 22:33:06.642 # Server initialized
22:33:06 redis.1  | 71019:M 12 Aug 2020 22:33:06.643 * Loading RDB produced by version 6.0.1
22:33:06 redis.1  | 71019:M 12 Aug 2020 22:33:06.643 * RDB age 51 seconds
22:33:06 redis.1  | 71019:M 12 Aug 2020 22:33:06.643 * RDB memory usage when created 1.02 Mb
22:33:06 redis.1  | 71019:M 12 Aug 2020 22:33:06.643 * DB loaded from disk: 0.001 seconds
22:33:06 redis.1  | 71019:M 12 Aug 2020 22:33:06.644 * Ready to accept connections
22:33:07 worker.1 | /Users/pcowe/Desktop/maps4all/app/__init__.py:18: FlaskWTFDeprecationWarning: "flask_wtf.CsrfProtect" has been renamed to "CSRFProtect" and will be removed in 1.0.
22:33:07 web.1    | /Users/pcowe/Desktop/maps4all/app/__init__.py:18: FlaskWTFDeprecationWarning: "flask_wtf.CsrfProtect" has been renamed to "CSRFProtect" and will be removed in 1.0.
22:33:07 worker.1 |   csrf = CsrfProtect()
22:33:07 web.1    |   csrf = CsrfProtect()
22:33:07 web.1    | Importing environment from .env file
22:33:07 worker.1 | Importing environment from .env file
22:33:07 web.1    | /Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py:835: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True or False to suppress this warning.
22:33:07 worker.1 | /Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py:835: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True or False to suppress this warning.
22:33:07 web.1    |   'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '
22:33:07 worker.1 |   'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '
22:33:07 web.1    |  * Serving Flask app "app" (lazy loading)
22:33:07 web.1    |  * Environment: production
22:33:07 web.1    |    WARNING: This is a development server. Do not use it in a production deployment.
22:33:07 web.1    |    Use a production WSGI server instead.
22:33:07 web.1    |  * Debug mode: on
22:33:07 worker.1 | 22:33:07 Worker rq:worker:99d42a58c1404444877927353f16c549: started, version 1.3.0
22:33:07 worker.1 | 22:33:07 *** Listening on default...
22:33:07 web.1    |  * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
22:33:07 web.1    |  * Restarting with stat
22:33:08 web.1    | /Users/pcowe/Desktop/maps4all/app/__init__.py:18: FlaskWTFDeprecationWarning: "flask_wtf.CsrfProtect" has been renamed to "CSRFProtect" and will be removed in 1.0.
22:33:08 web.1    |   csrf = CsrfProtect()
22:33:08 web.1    | /Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/flask_sqlalchemy/__init__.py:835: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True or False to suppress this warning.
22:33:08 web.1    |   'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '
22:33:08 web.1    |  * Debugger is active!
22:33:08 web.1    |  * Debugger PIN: 314-175-405
22:33:45 web.1    | 127.0.0.1 - - [12/Aug/2020 22:33:45] "GET / HTTP/1.1" 500 -
22:33:45 web.1    | Traceback (most recent call last):
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/webassets/filter/__init__.py", line 518, in subprocess
22:33:45 web.1    |     shell=os.name == 'nt')
22:33:45 web.1    |   File "/Users/pcowe/opt/anaconda3/lib/python3.7/subprocess.py", line 775, in __init__
22:33:45 web.1    |     restore_signals, start_new_session)
22:33:45 web.1    |   File "/Users/pcowe/opt/anaconda3/lib/python3.7/subprocess.py", line 1522, in _execute_child
22:33:45 web.1    |     raise child_exception_type(errno_num, err_msg, err_filename)
22:33:45 web.1    | FileNotFoundError: [Errno 2] No such file or directory: 'sass': 'sass'
22:33:45 web.1    | 
22:33:45 web.1    | During handling of the above exception, another exception occurred:
22:33:45 web.1    | 
22:33:45 web.1    | Traceback (most recent call last):
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/flask/app.py", line 2464, in __call__
22:33:45 web.1    |     return self.wsgi_app(environ, start_response)
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/flask/app.py", line 2450, in wsgi_app
22:33:45 web.1    |     response = self.handle_exception(e)
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/flask/app.py", line 1867, in handle_exception
22:33:45 web.1    |     reraise(exc_type, exc_value, tb)
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
22:33:45 web.1    |     raise value
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
22:33:45 web.1    |     response = self.full_dispatch_request()
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
22:33:45 web.1    |     rv = self.handle_user_exception(e)
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
22:33:45 web.1    |     reraise(exc_type, exc_value, tb)
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
22:33:45 web.1    |     raise value
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
22:33:45 web.1    |     rv = self.dispatch_request()
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
22:33:45 web.1    |     return self.view_functions[rule.endpoint](**req.view_args)
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/app/main/views.py", line 68, in index
22:33:45 web.1    |     modal=modal_attributes))
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/flask/templating.py", line 140, in render_template
22:33:45 web.1    |     ctx.app,
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/flask/templating.py", line 120, in _render
22:33:45 web.1    |     rv = template.render(context)
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
22:33:45 web.1    |     self.environment.handle_exception()
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
22:33:45 web.1    |     reraise(*rewrite_traceback_stack(source=source))
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
22:33:45 web.1    |     raise value.with_traceback(tb)
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/app/templates/main/index.html", line 1, in top-level template code
22:33:45 web.1    |     {% extends 'layouts/base.html' %}
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/app/templates/layouts/base.html", line 5, in top-level template code
22:33:45 web.1    |     {% include 'partials/_head.html' %}
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/app/templates/partials/_head.html", line 8, in top-level template code
22:33:45 web.1    |     {% assets 'app_css' %}<link rel="stylesheet" type="text/css" href="{{ ASSET_URL }}">{% endassets %}
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/webassets/ext/jinja2.py", line 187, in _render_assets
22:33:45 web.1    |     urls = bundle.urls(calculate_sri=True)
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/webassets/bundle.py", line 833, in urls
22:33:45 web.1    |     urls.extend(bundle._urls(new_ctx, extra_filters, *args, **kwargs))
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/webassets/bundle.py", line 768, in _urls
22:33:45 web.1    |     *args, **kwargs)
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/webassets/bundle.py", line 620, in _build
22:33:45 web.1    |     force, disable_cache=disable_cache, extra_filters=extra_filters)
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/webassets/bundle.py", line 544, in _merge_and_apply
22:33:45 web.1    |     kwargs=item_data)
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/webassets/merge.py", line 280, in apply
22:33:45 web.1    |     return self._wrap_cache(key, func)
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/webassets/merge.py", line 222, in _wrap_cache
22:33:45 web.1    |     content = func().getvalue()
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/webassets/merge.py", line 255, in func
22:33:45 web.1    |     getattr(filter, type)(data, out, **kwargs_final)
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/webassets/filter/sass.py", line 148, in input
22:33:45 web.1    |     self._apply_sass(_in, out, os.path.dirname(source_path))
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/webassets/filter/sass.py", line 142, in _apply_sass
22:33:45 web.1    |     return self.subprocess(args, out, _in, cwd=child_cwd)
22:33:45 web.1    |   File "/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site-packages/webassets/filter/__init__.py", line 520, in subprocess
22:33:45 web.1    |     raise FilterError('Program file not found: %s.' % argv[0])
22:33:45 web.1    | webassets.exceptions.FilterError: Program file not found: sass.
22:33:45 web.1    | 127.0.0.1 - - [12/Aug/2020 22:33:45] "GET /?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 -
22:33:45 web.1    | 127.0.0.1 - - [12/Aug/2020 22:33:45] "GET /?__debugger__=yes&cmd=resource&f=jquery.js HTTP/1.1" 200 -
22:33:45 web.1    | 127.0.0.1 - - [12/Aug/2020 22:33:45] "GET /?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 -
22:33:45 web.1    | 127.0.0.1 - - [12/Aug/2020 22:33:45] "GET /?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
22:33:45 web.1    | 127.0.0.1 - - [12/Aug/2020 22:33:45] "GET /?__debugger__=yes&cmd=resource&f=ubuntu.ttf HTTP/1.1" 200 -
    

Please help, how can I resolve this?

2

Answers


  1. Chosen as BEST ANSWER
    npm install -g sass
    

    Rerun app.


  2. I’m writing this 7 months after your initial question, so I doubt you still need an answer; Looks like you need to install SASS. If I forget to install LESSC on a new machine, I get something similar in my own project.

    It is also possible that the code you use to create assets is optional for a production environment (which this looks like). In that case, you may need to copy up the assets and comment out the calling code.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search