Note that there are some explanatory texts on larger screens.

plurals
  1. POdjango-pipeline and s3boto storage don't seem to work together
    text
    copied!<p>I'm trying to use django-pipeline-1.1.27 with s3boto to compress and filter static files, and then upload them to an s3 bucket. If I just use:</p> <pre><code>PIPELINE_STORAGE = 'pipeline.storage.PipelineFinderStorage' </code></pre> <p>Then it works and I get a static folder with the nice versioned file that I configured. As soon as I switch to</p> <pre><code>PIPELINE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' </code></pre> <p>I get</p> <pre><code>Traceback (most recent call last): File "manage.py", line 15, in &lt;module&gt; execute_manager(settings) File "/my/virtual/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager utility.execute() File "/my/virtual/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/my/virtual/env/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv self.execute(*args, **options.__dict__) File "/my/virtual/env/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute output = self.handle(*args, **options) File "/my/virtual/env/lib/python2.7/site-packages/pipeline/management/commands/synccompress.py", line 39, in handle packager.pack_stylesheets(package, sync=sync, force=force) File "/my/virtual/env/lib/python2.7/site-packages/pipeline/packager.py", line 52, in pack_stylesheets **kwargs) File "/my/virtual/env/lib/python2.7/site-packages/pipeline/packager.py", line 60, in pack package['output'], package['paths']) File "/my/virtual/env/lib/python2.7/site-packages/pipeline/versioning/__init__.py", line 45, in need_update version = self.version(paths) File "/my/virtual/env/lib/python2.7/site-packages/pipeline/versioning/__init__.py", line 20, in version return getattr(self.versioner, 'version')(paths) File "/my/virtual/env/lib/python2.7/site-packages/pipeline/versioning/hash/__init__.py", line 37, in version buf = self.concatenate(paths) File "/my/virtual/env/lib/python2.7/site-packages/pipeline/versioning/hash/__init__.py", line 27, in concatenate return '\n'.join([self.read_file(path) for path in paths]) File "/my/virtual/env/lib/python2.7/site-packages/pipeline/versioning/hash/__init__.py", line 31, in read_file file = storage.open(path, 'rb') File "/my/virtual/env/lib/python2.7/site-packages/django/core/files/storage.py", line 33, in open file = self._open(name, mode) File "/my/virtual/env/lib/python2.7/site-packages/storages/backends/s3boto.py", line 177, in _open raise IOError('File does not exist: %s' % name) IOError: File does not exist: css/style.css </code></pre> <p>which is one of my <strong>source</strong> files. So why does pipeline no longer want to do the filter/concatenate/compress steps when I switch to s3boto storage?</p> <p>It may be that I'm doing something. Here is other config in case it helps:</p> <pre><code>INSTALLED_APPS = ( ... 'pipeline', 'storages', ) STATICFILES_FINDERS = ( 'pipeline.finders.PipelineFinder', 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', ) STATIC_ROOT = "/some/path/outside/django_project/deploy_static" STATICFILES_DIRS = () # All statics in this site are in apps STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage' PIPELINE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' PIPELINE = True PIPELINE_AUTO = True PIPELINE_VERSION = True PIPELINE_VERSION_PLACEHOLDER = 'VERSION' PIPELINE_VERSIONING = 'pipeline.versioning.hash.SHA1Versioning' PIPELINE_CSS = { 'standard': { 'source_filenames': ( 'css/style.css', ... ), 'output_filename': 'css/all-VERSION.css', 'extra_context': { 'media': 'screen,projection', }, } } </code></pre> <p>My site is on Django 1.3.1.</p> <p>The command I'm running is:</p> <pre><code>python manage.py synccompress --force </code></pre> <p>The AWS creds are also in settings, but that's moot because it's not even getting to that point.</p> <p><strong>UPDATE</strong> Added full stack and settings requested in comments</p> <p><strong>UPDATE</strong> At the request of the library author, I tried upgrading to the latest beta. Observations from that so far:</p> <ol> <li>I don't know how to get versioned compressed files now</li> <li>collectstatic leaves me with the compressed files <em>and</em> the originals</li> <li>Still getting the same error from django-pipeline when boto storage is configured: it wants to send my <em>source</em> files to s3, but I can't even see where it's staging my assets. Nothing gets placed in STATIC_ROOT.</li> </ol> <p><strong>UPDATE</strong> I've created the simplest project that works for finder storage and then breaks with S3Boto. I've pushed it to github, and included a capture of the stacktrace.</p> <p><a href="https://github.com/estebistec/simple_pipeline" rel="nofollow">https://github.com/estebistec/simple_pipeline</a> https://raw.github.com/estebistec/simple_pipeline/master/STACKTRACE</p> <p>I would be ecstatic if I could be told I'm doing some really dumb and this should all just work.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload