Analytics stack - sass compilation fails

148 views
Skip to first unread message

eug...@opencraft.com

unread,
Mar 11, 2016, 10:32:13 AM3/11/16
to General Open edX discussion
Hi guys!

In analyticsstack, `paver devstack lms` fails during "compile_assets" stage, with non-informative error message:

edxapp@precise64:~/edx-platform$ paver devstack lms
// snip : requirements install, reindex_course
---> pavelib.assets.update_assets
python manage.py lms --settings=devstack preprocess_assets lms/static/sass/*.scss lms/static/themed_sass
System check identified some issues:
WARNINGS:
wiki.ArticleRevision.ip_address: (fields.W900) IPAddressField has been deprecated. Support for it (except in historical migrations) will be removed in Django 1.9.
HINT: Use GenericIPAddressField instead.
Finished preprocessing lms assets.
xmodule_assets common/static/xmodule
Finished processing xmodule assets.
---> pavelib.assets.compile_coffeescript
node_modules/.bin/coffee --compile `find /edx/app/edxapp/edx-platform/lms /edx/app/edxapp/edx-platform/cms /edx/app/edxapp/edx-platform/common -type f -name "*.coffee"`
---> pavelib.assets.compile_sass
Killed

If I upgrade to libsass 0.10.1 (using pip install -U libsass), the error message make a little bit more sense:

Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/paver/tasks.py", line 196, in _run_task
    return do_task()
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/paver/tasks.py", line 193, in do_task
    return func(**kw)
  File "pavelib/assets.py", line 267, in compile_sass
    output_style=output_style,
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/sass.py", line 644, in compile
    raise CompileError(v)
CompileError: Error: media query expression must begin with '('
        on line 65 of node_modules/edx-pattern-library/node_modules/breakpoint-sass/stylesheets/_breakpoint.scss
>> 
   ----^

So, what am I doing wrong and how to fix it? I've tried switching between master and release branches - no luck.

Braden MacDonald

unread,
Mar 14, 2016, 9:45:34 PM3/14/16
to edx-...@googlegroups.com
Eugeny, if you're still experiencing this error, can you try "paver compile_sass --debug" and see if that produces a more useful error message? You can also pass in "--system=lms" to skip the CMS, in case the problem is only on the CMS side.

Finally, if that doesn't help, you can always put "import pdb; pdb.set_trace()" into the code and step through until you find the error.

--
Braden

--
You received this message because you are subscribed to the Google Groups "General Open edX discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/c19afde1-d40f-47e7-a4c4-dd446a0aeffa%40googlegroups.com.

Zhen Zhai

unread,
Oct 12, 2016, 8:57:11 AM10/12/16
to General Open edX discussion
I'm facing the same error. I did a trace and found that sass.compile of lms/static is causing the trouble. Everytime it tries to compile, it get killed after a few seconds.

Can you please help?

Thank you,

Zhen
Reply all
Reply to author
Forward
0 new messages