from django_libsass import SassCompiler

Following on from the Error during Template Rendering, I still have not solved why I get a

Exception Value:
'module' object has no attribute 'compile'

as previous analyzed, I suspect it means sass is not recognized as a module. But having posted the question on StackOverflow, one of the Wagtail guys have replied :

“…Indicates that Django Compressor is trying to run django_libsass.SassCompiler as a shell command, and the script is failing to run.” – This is a red herring. Django-compressor first tries to interpret the string as a python module, and if that fails (as apparently it is doing here), it falls back on treating it as a shell command. It shouldn’t be necessary to install a command-line Sass tool to use Wagtail – the django-libsass library should be handling it entirely on the Python side.” – gasman

Looks like I’m looking at the wrong stuff then!

 

He also commented:

What error message (if any) do you get if you run from django_libsass import SassCompiler within manage.py shell? –  gasman

I went back into shell, ran

python manage.py shell

Python 2.7.6 (default, Nov 11 2013, 18:34:29)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
(InteractiveConsole)
>>> from django_libsass import SassCompiler

Did not get any errors there, which means django_libsass and SassCompiler are both working and the errors lies elsewhere. Will have to go strain my eyes and poke at that riddle.

Advertisements

2 comments

  1. Hello there.

    Did you ever solve this riddle?

    I’m in the same boat right now.

    Is it anything to do with the order that the various sass modules/system packages get installed?

    Thats a wild guess by the way, if you haven’t noticed 🙂

    V

    1. Hi back!

      In my case, I had various other sass-running modules installed (gem & sass itself), it was trying to call attribute ‘compile’ from those modules instead of from django_libsass, and it couldn’t find any.

      So you’re right!

      I solved it by removing everything sass related other than django_libsass itself.

      Hope you manage to solve yours without too much pain!

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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