question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

With Django 1.11 files get post-processed multiple times

See original GitHub issue

On Django 1.11 I see pipeline post-process the same file to the same hashed version multiple times and in the end I have 2 different files e.g.

media/admin.min.70004aec9612.css
media/admin.min.3719a5a090af.css

That does not happen on Django <1.10

example snippet of a my config:

         'admin_min_css': {                                             
                'source_filenames': (                                      
                'js/libs/chosen/chosen.css',                           
            ),                                                         
            'output_filename': 'admin.min.css',                        
         },

Anyone else experiencing that? Possibly related to the introduction of storage.ManifestStaticFilesStorage.max_post_process_passes in 1.11

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
czubik8805commented, Feb 7, 2018

I confirm this error with Django 1.11.10. I see pipeline post-process the same file multiple times.

Post-processed 'bower_components/bootstrap/dist/css/bootstrap.css' as 'bower_components/bootstrap/dist/css/bootstrap.60711a51db5e.css'
Post-processed 'bower_components/bootstrap/dist/css/bootstrap.css' as 'bower_components/bootstrap/dist/css/bootstrap.cb8a77bb5700.css'
Post-processed 'bower_components/bootstrap/dist/css/bootstrap.css' as 'bower_components/bootstrap/dist/css/bootstrap.3c7be87695cb.css'

after a while, this error comes up:

Post-processing 'All' failed!

Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/project/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/home/project/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/project/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/project/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/home/project/venv/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 199, in handle
    collected = self.collect()
  File "/home/project/venv/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 145, in collect
    raise processed
RuntimeError: Max post-process passes exceeded.

I use S3BotoStorage.

0reactions
DrMeerscommented, Jul 16, 2019

When using S3 if query-string authentication is enabled, you can end up in a situation where CSS files contain URLs with query-string parameters such as AWSAccessKeyId=...&Signature=...=&Expires=... – and each time each file is hashed, these can change, creating an endless loop of differing hashes. Turing AWS_QUERYSTRING_AUTH off might help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HashedFilesMixin's post_process() yields multiple times for ...
I created a new Django 1.11 project with the admin app enabled. It tries to collect all the admin app files, and during...
Read more >
HashedFilesMixin's post_process() yields multiple times for ...
collectstatic files process. I created a new Django 1.11 project with the admin app enabled. It tries to collect all the admin app...
Read more >
Django 1.11 Form multiple data submit in one execute
I have a form called shift. here my forms.py class ShiftForm(forms.ModelForm): class Meta: model = Shift fields = '__all__'.
Read more >
Release 4.10 David Cortesi - PyInstaller Documentation
PyInstaller requires two Python modules in a Windows system. ... In order to locate included files at run time, your program needs to...
Read more >
(optional) Exporting a Model from PyTorch to ONNX and ...
You can get binary builds of ONNX and ONNX Runtime with pip install onnx onnxruntime . Note that ONNX Runtime is compatible with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found