[Django]-Django-pipeline is not been able to access a file. Access Denied Error

3👍

Remove

STATIC_PATH +

from both source_filenames and output_filename

I suspect the reason you added that was due to ./manage.py collectstatic not producing an output in your js/app directory (thats what caused my confusion). To fix this in settings.py set

PIPELINE_ENABLED = True  # pipeline > 1.3
#PIPELINE = True  # pipeline < 1.3
STATIC_ROOT = os.path.join(BASE_DIR, 'project/static')  # this should also be set

run

./manage.py collectstatic

you should see your generated output_filename

👤xiao

1👍

Another reason this can happen is if you’re missing a comma in the source_filenames tuple with one filename, which makes it a string:

With missing comma, ('js/app/controllers.js') is a string and throws SuspiciousFileOperation:

PIPELINE_JS = {
    'check': {
        'source_filenames' : (
            'js/app/controllers.js'
        ),
        'output_filename': 'js/app/check.js',
    },
}

Fixed:

PIPELINE_JS = {
    'check': {
        'source_filenames' : (
            'js/app/controllers.js',
        ),
        'output_filename': 'js/app/check.js',
    },
}

Leave a comment