Getting this error on run server locally - compressor.exceptions.UncompressableFileError: 'css/style.css' could not be found in the COMPRESS_ROOT '/Users/khushmeeet/dev/codex/staticfiles' or with staticfiles.

My Django project was running locally before. But today I am not able to server my app locally. I am getting this error “compressor.exceptions.UncompressableFileError: ‘css/style.css’ could not be found in the COMPRESS_ROOT ‘/Users/khushmeeet/dev/codex/staticfiles’ or with staticfiles.”

I have tried running collectstatic. But getting the following error

❯ python collectstatic                     

0 static files copied to '/Users/khushmeeet/dev/codex/staticfiles'.

I then ran find static command, to see where Django is looking for static files. But that failed too.

❯ python findstatic --verbosity 3 css/style.css
No matching file found for 'css/style.css'.

Looking in the following locations:

One more thing, I am using SCSS for my CSS files. Could this be an issue?

I am stuck here for far too long, and it’s frustrating, because I have tried everything, that I cloud, but still not able to locate the problem. Really appreciate, if someone could tell me, what is going on here?

Here are my project details -

├── codex
│   ├──
│   ├──
│   ├──
│   ├──
│   └──
├── db.sqlite3
├── main
│   ├──
│   ├──
│   ├──
│   ├──
│   ├── migrations
│   ├──
│   ├── static
│   ├── templates
│   ├──
│   ├──
│   └──
└── templates
    ├── base.html
    └── footer.html

My file



    ('text/x-scss', 'django_libsass.SassCompiler'),
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')

Hi Khushmeeet,

Since your question doesn’t indicate that you checked, I would start by verifying that the file exists at /Users/khushmeeet/dev/codex/staticfiles/css/style.css

Hi Tim,

I checked in the /Users/khushmeeet/dev/codex/staticfiles/css/style.css there are no files present. From what I understand, when I run python collectstatic, Django will copy my css files to /Users/khushmeeet/dev/codex/staticfiles aka STATIC_ROOT.

But when I run the command, I get this.

❯ python collectstatic                     

0 static files copied to '/Users/khushmeeet/dev/codex/staticfiles'.

I don’t see where your css files are in your project. Where is that file located in your project?

Hi Ken,

My CSS files are located under codex/main/static/css

Here is the complete tree.

│   └── css
│       ├── style.23337793ede0.css
│       ├── style.526b15d32a8f.css
│       ├── style.56959eb751fe.css
│       ├── style.ce88d897647e.css
│       └── style.d6ff3016c650.css
├── css
│   ├── satoshi.css
│   └── style.scss
├── fonts
│   ├── Satoshi-Black.eot
│   ├── Satoshi-Black.ttf
│   ├── Satoshi-Black.woff
└── js
    └── main.js

I would specify the full path for your STATICFILES_DIRS setting:

    os.path.join(BASE_DIR, 'main/static'),

Tried you suggestion. Still same error

0 static files copied to '/Users/khushmeeet/dev/codex/staticfiles'.

Alright we’re narrowing it down. Your application indeed can’t find the static files to copy.

Is there a reason you removed the default static files finders? The installation documentation for django-compressor seems to indicate to leave them there.

I believe changing the following setting will resolve your issue:


Ah! working now. Thanks so much Tim for the help. This has been really frustrating.

I think I must have missed it while trying to integrate Django SCSS compressor.

Again, thanks a ton for the help Tim and Ken!

We’re glad to help. Best of luck with your projects moving forward!

1 Like