cyberdelia/django-pipeline — Issue #20: Caught CompilerError while rendering
Author: rfkrocktk
Created: 2011-10-12 04:35:38+00:00
State: open

I'm getting a really weird error when trying to render my pages:

Environment:

Request Method: GET
Request URL: http://localhost:8000/

Django Version: 1.3
Python Version: 2.7.1
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.admin',
'django.contrib.admindocs',
'django.contrib.staticfiles',
'pipeline',
'reversion',
'south',
'myproject.web']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')

Template error:
In template /home/rfkrocktk/Desktop/myproject/src/myproject/web/templates/desktop/root.html, error at line 6
Caught CompilerError while rendering: /var/lib/gems/1.8/gems/less-2.0.7/bin/lessc:20:in `read': No such file or directory - -x (Errno::ENOENT)
from /var/lib/gems/1.8/gems/less-2.0.7/bin/lessc:20
from /usr/local/bin/lessc:19:in `load'
from /usr/local/bin/lessc:19

1 : {% load static %}

2 : {% load compressed %}

3 :

4 :

5 :

6 :	{% block stylesheets %} {% compressed_css 'all' %} {% endblock %}

7 :

{% block title %}{% endblock %} » myproject

8 :

9 :

10 :	{% block body %}{% endblock %}

11 :	{% block scripts %}{% compressed_js 'all' %}{% endblock %}

12 :

13 :

14 :

Traceback:
File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/core/handlers/base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/views/generic/simple.py" in direct_to_template
28. return HttpResponse(t.render(c), mimetype=mimetype)
File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/template/base.py" in render
123. return self._render(context)
File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/template/base.py" in _render
117. return self.nodelist.render(context)
File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/template/base.py" in render
744. bits.append(self.render_node(node, context))
File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/template/debug.py" in render_node
73. result = node.render(context)
File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/template/loader_tags.py" in render
127. return compiled_parent._render(context)
File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/template/base.py" in _render
117. return self.nodelist.render(context)
File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/template/base.py" in render
744. bits.append(self.render_node(node, context))
File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/template/debug.py" in render_node
73. result = node.render(context)
File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/template/loader_tags.py" in render
127. return compiled_parent._render(context)
File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/template/base.py" in _render
117. return self.nodelist.render(context)
File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/template/base.py" in render
744. bits.append(self.render_node(node, context))
File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/template/debug.py" in render_node
73. result = node.render(context)
File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/template/loader_tags.py" in render
64. result = block.nodelist.render(context)
File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/template/base.py" in render
744. bits.append(self.render_node(node, context))
File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/template/debug.py" in render_node
73. result = node.render(context)
File "/home/rfkrocktk/Desktop/myproject/eggs/django_pipeline-1.1.18.1-py2.7.egg/pipeline/templatetags/compressed.py" in render
30. package['paths'] = self.packager.compile(package['paths'])
File "/home/rfkrocktk/Desktop/myproject/eggs/django_pipeline-1.1.18.1-py2.7.egg/pipeline/packager.py" in compile
50. return self.compiler.compile(paths)
File "/home/rfkrocktk/Desktop/myproject/eggs/django_pipeline-1.1.18.1-py2.7.egg/pipeline/compilers/__init__.py" in compile
25. compiled_content = compiler.compile_file(content)
File "/home/rfkrocktk/Desktop/myproject/eggs/django_pipeline-1.1.18.1-py2.7.egg/pipeline/compilers/less/__init__.py" in compile_file
25. content = self.execute_command(command, content)
File "/home/rfkrocktk/Desktop/myproject/eggs/django_pipeline-1.1.18.1-py2.7.egg/pipeline/compilers/__init__.py" in execute_command
86. raise CompilerError(error)

Exception Type: TemplateSyntaxError at /
Exception Value: Caught CompilerError while rendering: /var/lib/gems/1.8/gems/less-2.0.7/bin/lessc:20:in `read': No such file or directory - -x (Errno::ENOENT)
from /var/lib/gems/1.8/gems/less-2.0.7/bin/lessc:20
from /usr/local/bin/lessc:19:in `load'
from /usr/local/bin/lessc:19

I'm on Ubuntu 11.04. I installed less via: `gem install less` then symlinked `lessc` it to `/usr/local/bin/lessc` so it could find it. It seems like it's calling the compiler in a weird way. Is this a known bug or am I doing something wrong?