Skip to content

AttributeError: StringIO instance has no attribute 'name' #1

@jaap3

Description

@jaap3

When I run collectstatic and use 'PrecompressedStaticFilesStorage' or the 'CachedPrecompressedStaticFilesStorage' I get the following traceback:

Traceback (most recent call last):
  File "manage.py", line 54, in <module>
    sys.exit(django.core.management.execute_from_command_line())
  File "Django-1.4.5-py2.7.egg/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "Django-1.4.5-py2.7.egg/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "Django-1.4.5-py2.7.egg/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "Django-1.4.5-py2.7.egg/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "Django-1.4.5-py2.7.egg/django/core/management/base.py", line 371, in handle
    return self.handle_noargs(**options)
  File "Django-1.4.5-py2.7.egg/django/contrib/staticfiles/management/commands/collectstatic.py", line 163, in handle_noargs
    collected = self.collect()
  File "Django-1.4.5-py2.7.egg/django/contrib/staticfiles/management/commands/collectstatic.py", line 120, in collect
    for original_path, processed_path, processed in processor:
  File "django_precompressed-0.0.2-py2.7.egg/precompressed/storage/base.py", line 160, in post_process
    saved_name = self._save(gzipped_name, gzipped_file)
  File "Django-1.4.5-py2.7.egg/django/core/files/storage.py", line 195, in _save
    for chunk in content.chunks():
  File "Django-1.4.5-py2.7.egg/django/core/files/base.py", line 65, in chunks
    counter = self.size
  File "Django-1.4.5-py2.7.egg/django/core/files/base.py", line 39, in _get_size
    elif os.path.exists(self.file.name):
AttributeError: StringIO instance has no attribute 'name'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions