SassCompile on command line

Following this StackOverflow reply,

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

Indicates that Django Compressor is trying to run django_libsass.SassCompiler as a shell command, and the script is failing to run. -Kevin Mooney

So digging through the traceback, I found a line that referenced compressor.

Further digging into compressor reveals this line in


if "{outfile}" in self.command and not "outfile" in options:
ext = self.type and ".%s" % self.type or ""
self.outfile = NamedTemporaryFile(mode='r+', suffix=ext)
options["outfile"] =
command = fstr(self.command).format(**options)
proc = subprocess.Popen(command, shell=True, cwd=self.cwd,
stdout=self.stdout, stdin=self.stdin, stderr=self.stderr)
if self.infile is None:
filtered, err = proc.communicate(self.content.encode('utf8'))
filtered, err = proc.communicate()
except (IOError, OSError), e:
raise FilterError('Unable to apply %s (%r): %s' %
(self.__class__.__name__, self.command, e))

So being the brutish non-coder that I am, I simply turned that ‘off’ to :

command = fstr(self.command).format(**options)
proc = subprocess.Popen(command, shell=False, cwd=self.cwd,
stdout=self.stdout, stdin=self.stdin, stderr=self.stderr)

It definitely helped to stop the

Error during template rendering

In template /home/username/env/lib/python2.7/site-packages/wagtail/wagtailadmin/templates/wagtailadmin/skeleton.html, error at line 20
/bin/sh: django_libsass.SassCompiler: command not found

Although now I get a :

'module' object has no attribute 'compile'

Hmm… let’s see where to go next?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s