Flask 如何修复webassets.exceptions.FilterError:未找到程序文件:sass
我正在编辑一个开源的Flask应用程序——它工作得很好。我在Flask 如何修复webassets.exceptions.FilterError:未找到程序文件:sass,flask,sass,redis,rubygems,Flask,Sass,Redis,Rubygems,我正在编辑一个开源的Flask应用程序——它工作得很好。我在.scss文件中更改了一件事,整个应用程序无法加载 我解开了所有的变化,但没有任何变化。我无法再启动我的应用程序 每次我运行honcho start-f Local并导航到localhost:5000/ 我收到此错误webassets.exceptions.FilterError:找不到程序文件:sass 这是我终端上的跟踪副本 (venv) pcowe@Pauls-MacBook-Pro maps4all % honcho start
.scss
文件中更改了一件事,整个应用程序无法加载
我解开了所有的变化,但没有任何变化。我无法再启动我的应用程序
每次我运行honcho start-f Local
并导航到localhost:5000/
我收到此错误webassets.exceptions.FilterError:找不到程序文件:sass
这是我终端上的跟踪副本
(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 -
(venv)pcowe@Pauls-MacBook Pro maps4all%honcho开始-f本地
22:33:06系统| web.1启动(pid=71020)
22:33:06系统| redis.1启动(pid=71019)
22:33:06系统|工人1启动(pid=71021)
22:33:06 redis.1 | 71019:C 2020年8月12日22:33:06.639 | ooooooooooooo redis开始ooooooooooo
22:33:06 redis.1 | 71019:C 2020年8月12日22:33:06.639#redis version=6.0.1,bits=64,commit=00000000,modified=0,pid=71019,刚刚开始
22:33:06 redis.1 | 71019:C 2020年8月12日22:33:06.639#警告:未使用默认配置指定配置文件。要指定配置文件,请使用redis server/path/to/redis.conf
22:33:06 redis.1 | 71019:M 2020年8月12日22:33:06.640*将最大打开文件数增加到10032(最初设置为2560)。
22:33:06 redis.1 | 71019:M 2020年8月12日22:33:06.642*运行模式=独立,端口=6379。
22:33:06 redis.1 | 71019:M 2020年8月12日22:33:06.642#服务器已初始化
22:33:06 redis.1 | 71019:M 2020年8月12日22:33:06.643*加载版本6.0.1生成的RDB
22:33:06 redis.1 | 71019:M 2020年8月12日22:33:06.643*RDB年龄51秒
22:33:06 redis.1 | 71019:M 2020年8月12日22:33:06.643*创建时的RDB内存使用率1.02 Mb
22:33:06 redis.1 | 71019:M 2020年8月12日22:33:06.643*DB从磁盘加载:0.001秒
22:33:06 redis.1 | 71019:M 2020年8月12日22:33:06.644*准备接受连接
22:33:07 worker.1 |/Users/pcowe/Desktop/maps4all/app/__init__.py:18:FlaskWTFDeprecationWarning:“flask_wtf.CsrfProtect”已重命名为“CsrfProtect”,并将在1.0中删除。
22:33:07 web.1 |/Users/pcowe/Desktop/maps4all/app/__init__.py:18:FlaskWTFDeprecationWarning:“flask_wtf.CsrfProtect”已重命名为“CsrfProtect”,并将在1.0中删除。
22:33:07工人。1 | csrf=CsrfProtect()
22:33:07 web.1 | csrf=CsrfProtect()
22:33:07 web.1 |从.env文件导入环境
22:33:07 worker.1 |从.env文件导入环境
22:33:07 web.1 |/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site packages/flask_-sqlalchemy/__-init_;.py:835:fsadeprecision警告:sqlalchemy_-TRACK_修改会增加大量开销,并且在将来默认情况下将被禁用。将其设置为True或False可抑制此警告。
22:33:07 worker.1 |/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site packages/flask_-sqlalchemy/__-init_;.py:835:fsadeprecision警告:sqlalchemy_-TRACK_修改会增加大量开销,并且在将来默认情况下将被禁用。将其设置为True或False可抑制此警告。
22:33:07 web.1 |“SQLALCHEMY_TRACK_修改增加了大量开销,并且”
22:33:07 worker.1 |“SQLALCHEMY|TRACK|修改增加了大量开销并
22:33:07 web.1 |*服务瓶应用程序“应用程序”(延迟加载)
22:33:07 web.1 |*环境:生产
22:33:07 web.1 |警告:这是一台开发服务器。不要在生产部署中使用它。
22:33:07 web.1 |改用生产WSGI服务器。
22:33:07 web.1 |*调试模式:打开
22:33:07工作者。1 | 22:33:07工作者rq:工作者:99d42a58c1404444877927353f16c549:已启动,版本1.3.0
22:33:07工人。1 | 22:33:07***正在收听默认设置。。。
22:33:07 web.1 |*正在运行http://127.0.0.1:5000/ (按CTRL+C退出)
22:33:07 web.1 |*使用stat重新启动
22:33:08 web.1 |/Users/pcowe/Desktop/maps4all/app/__init__.py:18:FlaskWTFDeprecationWarning:“flask_wtf.CsrfProtect”已重命名为“CsrfProtect”,并将在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:fsadeprecision警告:sqlalchemy_-TRACK_修改会增加大量开销,并且在将来默认情况下将被禁用。将其设置为True或False可抑制此警告。
22:33:08 web.1 |“SQLALCHEMY|TRACK|u修改增加了大量开销并
22:33:08 web.1 |*调试器处于活动状态!
22:33:08 web.1 |*调试器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 |回溯(最近一次呼叫最后一次):
22:33:45 web.1 | File“/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site packages/webassets/filter/_uuinit_uu.py”,第518行,在子流程中
22:33:45 web.1 | shell=os.name=='nt')
22:33:45 web.1 |文件“/Users/pcowe/opt/anaconda3/lib/python3.7/subprocess.py”,第775行,在u init中__
22:33:45 web.1 |恢复信号,启动新会话)
22:33:45 web.1 |文件“/Users/pcowe/opt/anaconda3/lib/python3.7/subprocess.py”,第1522行,在_execute_child中
22:33:45 web.1 |引发子项异常类型(errno_num、err_msg、err_filename)
22:33:45 web.1 | FileNotFoundError:[Errno 2]没有这样的文件或目录:“sass”:“sass”
22:33:45网页1 |
22:33:45 web.1 |在处理上述异常期间,发生了另一个异常:
22:33:45网页1 |
22:33:45 web.1 |回溯(最近一次呼叫最后一次):
22:33:45 web.1 | File“/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site packages/flask/app.py”,第2464行,in | u call__
22:33:45 web.1 | return self.wsgi_应用程序(环境,启动响应)
22:33:45 web.1 |文件“/Users/pcowe/Desktop/maps4all/venv/lib/python3.7/site packages/flask/app.py”,第2450行,在wsgi|U应用程序中
22:33:45 web.1 | response=self.handle_异常(e)
22:33:45 web.1 |文件“/用户/pcowe/Desktop/maps4all/venv/l