Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manage.py synccompress - No such file or directory #19

Closed
naftulikay opened this issue Oct 11, 2011 · 5 comments
Closed

manage.py synccompress - No such file or directory #19

naftulikay opened this issue Oct 11, 2011 · 5 comments

Comments

@naftulikay
Copy link

I've got a pretty simple application configuration going here:

STATIC_URL = '/static/'
STATIC_ROOT = '/tmp/myproject/static/'
STATICFILES_FINDERS = (
    'pipeline.finders.PipelineFinder',
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

# ...
PIPELINE = not DEBUG
PIPELINE_AUTO = True
PIPELINE_VERSION = True

PIPELINE_COMPILERS = (
    'pipeline.compilers.less.LessCompiler',
)

PIPELINE_CSS = {
    'all': {
        'source_filenames': (
            'styles/*.less',
        ),
        'output_filename': 'styles/application.?.css',
    }
}

PIPELINE_JS = {
    'all': {
        'source_filenames': (
            'scripts/jquery-1.6.2.min.js',
            'scripts/bootstrap-*.js',
            'scripts/jquery.*.js',
            'scripts/application.js',
        ),
        'output_filename': 'scripts/application.?.js',
    }
}

# ...

INSTALLED_APPS = (
    # ...
    'pipeline',
    'myproject.web',
)

When I go to run the synccompress task, I get the following:

Traceback (most recent call last):
  File "bin/django", line 22, in <module>
    djangorecipe.manage.main('myproject.settings')
  File "/home/rfkrocktk/Desktop/myproject/eggs/djangorecipe-0.99-py2.7.egg/djangorecipe/manage.py", line 16, in main
    management.execute_manager(mod)
  File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/rfkrocktk/Desktop/myproject/eggs/Django-1.3-py2.7.egg/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/home/rfkrocktk/Desktop/myproject/eggs/django_pipeline-1.1.18.1-py2.7.egg/pipeline/management/commands/synccompress.py", line 39, in handle
    packager.pack_stylesheets(package, sync=sync, force=force)
  File "/home/rfkrocktk/Desktop/myproject/eggs/django_pipeline-1.1.18.1-py2.7.egg/pipeline/packager.py", line 47, in pack_stylesheets
    variant=variant, **kwargs)
  File "/home/rfkrocktk/Desktop/myproject/eggs/django_pipeline-1.1.18.1-py2.7.egg/pipeline/packager.py", line 55, in pack
    package['output'], package['paths'])
  File "/home/rfkrocktk/Desktop/myproject/eggs/django_pipeline-1.1.18.1-py2.7.egg/pipeline/versioning/__init__.py", line 45, in need_update
    version = self.version(paths)
  File "/home/rfkrocktk/Desktop/myproject/eggs/django_pipeline-1.1.18.1-py2.7.egg/pipeline/versioning/__init__.py", line 20, in version
    return getattr(self.versioner, 'version')(paths)
  File "/home/rfkrocktk/Desktop/myproject/eggs/django_pipeline-1.1.18.1-py2.7.egg/pipeline/versioning/mtime/__init__.py", line 11, in version
    [int(time.mktime(storage.modified_time(path).timetuple())) for path in paths]
  File "/home/rfkrocktk/Desktop/myproject/eggs/django_pipeline-1.1.18.1-py2.7.egg/pipeline/storage.py", line 29, in modified_time
    return datetime.fromtimestamp(os.path.getmtime(self.path(name)))
  File "/usr/lib/python2.7/genericpath.py", line 54, in getmtime
    return os.stat(filename).st_mtime
OSError: [Errno 2] No such file or directory: '/tmp/myproject/static/s'

What am I doing wrong here?

@naftulikay
Copy link
Author

My bad, it seems that file globbing isn't working properly, as a path glob like scripts/*.js resolves to:

scripts/a.js
scripts/b.js
...etc.

@cyberdelia
Copy link
Member

Can you try with --force ?

@naftulikay
Copy link
Author

I think I did, it's working now, but file globbing doesn't seem to work with CSS sheets.

@cyberdelia
Copy link
Member

Your problem happend when there is no current compressed file for the package, pipeline try to find a version and die. I need to fix that ;)
Do you have any reproducible error with globbing ?

@naftulikay
Copy link
Author

I can't seem to reproduce it. I must have been doing something weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants