I'm trying to get django-pipeline working locally on Windows. When I run collecstatic or runserver and go to the site, I get the following error:
NotADirectoryError at /
[WinError 267] The directory name is invalid
On the site it happens when {% compressed_css 'main' %}
is called in the template.
Looking at the traceback it seems to be happening in pipeline\compilers\__init__.py
on this line: return list(executor.map(_compile, paths))
, with local vars:
futures <module 'concurrent.futures' from 'C:\\Python34\\Lib\\concurrent\\futures\\__init__.py'>
force False
_compile <function Compiler.compile.<locals>._compile at 0x0387A858>
paths ['sass/main.sass']
multiprocessing <module 'multiprocessing' from 'C:\\Python34\\Lib\\multiprocessing\\__init__.py'>
executor <concurrent.futures.thread.ThreadPoolExecutor object at 0x0387B970>
self <pipeline.compilers.Compiler object at 0x0387B870>
Relevant chunk of settings.py:
STATIC_ROOT = 'staticfiles'
STATIC_URL = '/static/'
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
STATICFILES_DIRS = (
(os.path.join(BASE_DIR, 'static/common')),
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'pipeline.finders.PipelineFinder',
)
# Pipeline
PIPELINE_SASS_BINARY = 'sass'
PIPELINE_YUGLIFY_BINARY = 'yuglify'
PIPELINE_COMPILERS = (
'pipeline.compilers.sass.SASSCompiler',
)
PIPELINE_CSS = {
'main': {
'source_filenames': (
'sass/main.sass',
),
'output_filename': 'css/main.css'
}
}
Both sass and yuglify work from the command line.
Relevant filesystem structure:
myproject/
...
settings.py
static/
common/
sass/
main.sass
If I take out PIPELINE_COMPILERS = (...)
and just use it to minify a regular CSS file, it works perfectly.