1

It's last some lines of traceback :

  File "C:\PycharmDev\TestVirtualEnv\testEnv1\lib\site-packages\pipeline\compressors\__init__.py", line 247, in execute_command
    stdin=subprocess.PIPE, stderr=subprocess.PIPE)
  File "C:\Python34\Lib\subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "C:\Python34\Lib\subprocess.py", line 1112, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] ...

And in settings.py :

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

STATIC_URL = '/static/'
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
STATIC_URL = '/static_prepared/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATICFILES_DIRS = [
    os.path.join(BASE_DIR, 'static_prepared'),
]
STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'pipeline.finders.PipelineFinder',
)
PIPELINE = {
    'STYLESHEETS': {
        'static_prepared': {
            'source_filenames': (
              '*.css',
            ),
            'output_filename': 'colors.css'
        },
    },
    'JAVASCRIPT': {
        'static_prepared': {
            'source_filenames': (
              '*.js',
            ),
            'output_filename': 'stats.js',
        }
    }
}

What's wrong with me?

When i use manage.py collectstatic, it doesn't work at all with pipeline.

It seems like only works like there's no pipeline.

The same as without pipeline. Normal manage.py collectstatic.

Why that error has been occurred?

I already made static and static_prepared directory on os.path.join(BASE_DIR, ...) manually.

How can i set pipeline correctly?

touchingtwist
  • 1,930
  • 4
  • 23
  • 38

1 Answers1

1

Replace other name like

PIPELINE = {
    'STYLE': {
        'static_prepared': {
            'source_filenames': (
              '*.css',
            ),
            'output_filename': 'colors.css'
        },
    },
    'JSCRIPT': {
        'static_prepared': {
            'source_filenames': (
              '*.js',
            ),
            'output_filename': 'stats.js',
        }
    }
}
H.fate
  • 644
  • 2
  • 7
  • 18
  • can you please explain what's the reason for the error? Error got fixed using this but now it doesn't show that new file while opening page source in chrome. – Darsh Modi Feb 22 '22 at 05:48