FilterError: django_libsass.SassCompiler: command not found

900 views
Skip to first unread message

J. Maceo Quintanar

unread,
Jan 19, 2015, 4:02:03 AM1/19/15
to wag...@googlegroups.com
Hello again,
So this is my second installation of wagtail. I removed the first installation due to an error I was getting when trying to install Postgres. I actually ended up uninstalling Python too. So I started again from scratch, this time installing python 3.4.2 through homebrew (I was previously using python 2.78.) I installed my virtual env and then installed wagtail with no problems. 

After creating my project, I ran pip install -r requirements.txt and I got:

Requirement already satisfied (use --upgrade to upgrade): Django<1.8,>=1.7 in /Users/squintan/env/lib/python3.4/site-packages (from -r requirements.txt (line 2))
Requirement already satisfied (use --upgrade to upgrade): wagtail==0.8.4 in /Users/squintan/env/lib/python3.4/site-packages (from -r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): South==1.0.0 in /Users/squintan/env/lib/python3.4/site-packages (from wagtail==0.8.4->-r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): django-compressor>=1.4 in /Users/squintan/env/lib/python3.4/site-packages (from wagtail==0.8.4->-r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): django-libsass>=0.2 in /Users/squintan/env/lib/python3.4/site-packages (from wagtail==0.8.4->-r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): django-modelcluster>=0.4 in /Users/squintan/env/lib/python3.4/site-packages (from wagtail==0.8.4->-r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): django-taggit==0.12.2 in /Users/squintan/env/lib/python3.4/site-packages (from wagtail==0.8.4->-r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): django-treebeard==2.0 in /Users/squintan/env/lib/python3.4/site-packages (from wagtail==0.8.4->-r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): Pillow>=2.6.1 in /Users/squintan/env/lib/python3.4/site-packages (from wagtail==0.8.4->-r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): beautifulsoup4>=4.3.2 in /Users/squintan/env/lib/python3.4/site-packages (from wagtail==0.8.4->-r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): html5lib==0.999 in /Users/squintan/env/lib/python3.4/site-packages (from wagtail==0.8.4->-r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): Unidecode>=0.04.14 in /Users/squintan/env/lib/python3.4/site-packages (from wagtail==0.8.4->-r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): six>=1.7.0 in /Users/squintan/env/lib/python3.4/site-packages (from wagtail==0.8.4->-r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): requests>=2.0.0 in /Users/squintan/env/lib/python3.4/site-packages (from wagtail==0.8.4->-r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): django-appconf>=0.4 in /Users/squintan/env/lib/python3.4/site-packages (from django-compressor>=1.4->wagtail==0.8.4->-r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): libsass>=0.3.0 in /Users/squintan/env/lib/python3.4/site-packages (from django-libsass>=0.2->wagtail==0.8.4->-r requirements.txt (line 3))


Then I entered manage.py migrate with no errors, and then manage.py runserver. 

Sadly when I went to localhost:8000, I saw the following screen: 

FilterError at /

/bin/sh: django_libsass.SassCompiler: command not found
Request Method:GET
Request URL:http://localhost:8000/
Django Version:1.7.3
Exception Type:FilterError
Exception Value:
/bin/sh: django_libsass.SassCompiler: command not found
Exception Location:/Users/squintan/env/lib/python3.4/site-packages/compressor/filters/base.py in input, line 173
Python Executable:/Users/squintan/env/bin/python
Python Version:3.4.2
Python Path:
['/Users/squintan/nerveraking',
 '/Users/squintan/env/lib/python34.zip',
 '/Users/squintan/env/lib/python3.4',
 '/Users/squintan/env/lib/python3.4/plat-darwin',
 '/Users/squintan/env/lib/python3.4/lib-dynload',
 '/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4',
 '/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/plat-darwin',
 '/Users/squintan/env/lib/python3.4/site-packages']

Error during template rendering

In template /Users/squintan/nerveraking/core/templates/base.html, error at line 15

/bin/sh: django_libsass.SassCompiler: command not found

5<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
6<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
7<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
8 <head>
9 <meta charset="utf-8" />
10 <meta http-equiv="X-UA-Compatible" content="IE=edge" />
11 <title>{% block title %}{% if self.seo_title %}{{ self.seo_title }}{% else %}{{ self.title }}{% endif %}{% endblock %}{% block title_suffix %}{% endblock %}</title>
12 <meta name="description" content="" />
13 <meta name="viewport" content="width=device-width, initial-scale=1" />
14
15 {% compress css %}
16
17 <link rel="stylesheet" type="text/x-scss" href="{% static 'css/nerveraking.scss' %}">
18 {% endcompress %}
19
20 {% block extra_css %}
21
22 {% endblock %}
23 </head>
24
25 <body class="{% block body_class %}{% endblock %}">

I tried "pip install libsass", no luck. Later I saw somebody on the internet had a similar problem and they apparently fixed it by uninstalling everything sass related except for libsass and django_libsass. But when I try pip uninstall sass, I get "Cannot uninstall requirement sass, not installed".

Running from django_libsass import SassCompiler, from manage.py shell, I get:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Users/squintan/env/lib/python3.4/site-packages/django_libsass.py", line 3, in <module>
    import sass
  File "/Users/squintan/env/lib/python3.4/site-packages/sass.py", line 22, in <module>
    from _sass import (OUTPUT_STYLES, compile_dirname,
ImportError: dlopen(/Users/squintan/env/lib/python3.4/site-packages/_sass.so, 2): Symbol not found: __ZNSt12out_of_rangeD1Ev
  Referenced from: /Users/squintan/env/lib/python3.4/site-packages/_sass.so
  Expected in: /usr/lib/libstdc++.6.dylib
 in /Users/squintan/env/lib/python3.4/site-packages/_sass.so

Does anybody have any pointers as to what I may be doing wrong or where should I be looking? 

Klemens

unread,
Jan 20, 2015, 9:12:41 AM1/20/15
to wag...@googlegroups.com
this answer(s) seem legit: http://stackoverflow.com/a/22616554/194533

you might get further support at django_libsass.

and you might wanna use virtualenv.

regards,
klemens

--
You received this message because you are subscribed to the Google Groups "Wagtail" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wagtail+u...@googlegroups.com.
To post to this group, send email to wag...@googlegroups.com.
Visit this group at http://groups.google.com/group/wagtail.
To view this discussion on the web, visit https://groups.google.com/d/msgid/wagtail/1db6df5f-a40d-4c3c-9857-75f4a591b898%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
klemens mantzos
http://fetzig.at/

Matthew Westcott

unread,
Jan 20, 2015, 10:22:56 AM1/20/15
to wag...@googlegroups.com
From the final ImportError, it looks like the problem is occurring somewhere in the Python/C++ binding, which is handled by the 'libsass' library <https://github.com/dahlia/libsass-python>:

ImportError: dlopen(/Users/squintan/env/lib/python3.4/site-packages/_sass.so, 2): Symbol not found: __ZNSt12out_of_rangeD1Ev
Referenced from: /Users/squintan/env/lib/python3.4/site-packages/_sass.so
Expected in: /usr/lib/libstdc++.6.dylib
in /Users/squintan/env/lib/python3.4/site-packages/_sass.so

To isolate this, I'd suggest running 'pip install libsass' from a clean virtualenv - look out for any error messages during the build. Then, within the python shell, run:

import sass; sass

If the problem recurs, then it's somewhere within libsass-python or the libsass C++ library itself, which is outside my area of expertise...
If it succeeds (it should output something like "<module 'sass' from '.../local/lib/python2.7/site-packages/sass.pyc'>"), try uninstalling and reinstalling 'libsass' and 'django-libsass' within your Wagtail virtualenv, again looking out for any error messages.

Cheers,
- Matt

J. Maceo Quintanar

unread,
Jan 20, 2015, 10:25:42 PM1/20/15
to wag...@googlegroups.com
I think I may have figured out the problem but I still need to check a couple of more things. I just have a question: Is there a reason I shouldn't use the latest python 3.x instead the latest 2.7.x? 


J. Maceo Quintanar

 

--
You received this message because you are subscribed to a topic in the Google Groups "Wagtail" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wagtail/6rl2Rgztf6E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wagtail+u...@googlegroups.com.
To post to this group, send an email to wag...@googlegroups.com.

J. Maceo Quintanar

unread,
Jan 21, 2015, 3:39:51 AM1/21/15
to wag...@googlegroups.com
Nevermind the question about the python versions. I got that clarified in the docs.  

I did fix the error I was getting by eliminating a directory that was still keeping older python 3.4 and 2.7 files and changing paths in bash_profile. I will explain tomorrow with more precision and detail what I did so it can be helpful to others. Wagtail is up and running fine. I did find a few more issues with PostgreSQL and Elastic Search, but I will investigate on this later, and post questions/comments if needed.


J. Maceo Quintanar

 

Matthew Westcott

unread,
Feb 18, 2015, 7:12:31 AM2/18/15
to wag...@googlegroups.com
Bump :-)

J. Maceo Quintanar - if you have time to write up your findings, that would be much appreciated. Quite a lot of people have reported this error now, and while I don't think they all have the same root cause (the error is really just a 'catch-all' response to any ImportError) it would be great to get as much documentation of this as possible.

Cheers,
- Matt
> You received this message because you are subscribed to the Google Groups "Wagtail" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to wagtail+u...@googlegroups.com.
> To post to this group, send email to wag...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/wagtail/CAO%2BDUxYdKqT4nwoPbTd_EQFG9aiJ%2BXWft%2Bgz6NK_ZmVxiLBdGg%40mail.gmail.com.
Message has been deleted

Ferdy Rodríguez

unread,
Apr 21, 2015, 11:57:59 PM4/21/15
to wag...@googlegroups.com, mat...@west.co.tt
Hi, 

I was having the kinda the same error in a project deployed on webfaction, it all started because my user uploaded media was not rendering at that time I was just serving the files via nginx. When I was debugging I set DEBUG = True on production and then the media rendered however when I tried to get to Wagtail Admin I get the"FilterError: django_libsass.SassCompiler: command not found" error.

I tried everything that was posted in this conversation with no success. I even setup S3 storage for the static and media files and it still was showing the error. So finally the last thing that I did was update django-compressor to 1.5, I was using 1.4 at that time, after that everything started working again.

Hope that it helps someone.

Regards,
-Ferdy Rodriguez

Andrey Shipilov

unread,
Apr 22, 2015, 1:18:00 AM4/22/15
to wag...@googlegroups.com
Hey man. Which version of libsass are you using?
--
You received this message because you are subscribed to the Google Groups "Wagtail support" group.

To unsubscribe from this group and stop receiving emails from it, send an email to wagtail+u...@googlegroups.com.
To post to this group, send email to wag...@googlegroups.com.
Visit this group at http://groups.google.com/group/wagtail.

Matthew Westcott

unread,
Aug 12, 2015, 10:17:27 AM8/12/15
to wag...@googlegroups.com
Wagtail itself no longer depends on django-libsass as of version 1.0 (although wagtaildemo still does) - but for the benefit of anyone googling this error in future, I've now put together a wiki page detailing steps to try:

https://github.com/torchbox/django-libsass/wiki/Troubleshooting

Cheers,
- Matt

Reply all
Reply to author
Forward
0 new messages