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

Bug causing css file not to generate #201

Open
nappels opened this issue Jul 22, 2015 · 1 comment
Open

Bug causing css file not to generate #201

nappels opened this issue Jul 22, 2015 · 1 comment

Comments

@nappels
Copy link

nappels commented Jul 22, 2015

From the logs:

Version: 0.9.4
Python: 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
PIL version: 1.1.7
Platform: Darwin-14.4.0-x86_64-i386-64bit
Config: {'css_dir': '/Users/noah/Documents/Bop/git/suitandtie/app/assets/spriteGeneration/sprites', 'less_dir': False, 'force': False, 'json_dir': False, 'crop': False, 'less_template': None, 'css_url': u'', 'global_template': None, 'css_namespace': u'', 'html_dir': False, 'css_cachebuster': False, 'recursive': False, 'scss_template': None, 'css_pseudo_class_separator': u'', 'enabled_formats': ['img', 'css'], 'generate_css': True, 'source': '/Users/noah/Documents/Bop/git/suitandtie/app/assets/spriteGeneration/assets', 'optipng': False, 'follow_links': False, 'imagemagick': False, 'each_template': None, 'json_format': u'array', 'watch': False, 'css_sprite_namespace': u'', 'padding': u'1', 'ratio_template': None, 'ratios': '2,1', 'caat_dir': False, 'optipngpath': None, 'css_cachebuster_only_sprites': False, 'scss_dir': False, 'generate_image': True, 'cocos2d_dir': False, 'imagemagickpath': None, 'algorithm': u'square', 'css_cachebuster_filename': False, 'img_dir': '/Users/noah/Documents/Bop/git/suitandtie/app/assets/spriteGeneration/sprites', 'png8': False, 'quiet': False, 'project': False, 'css_separator': u'-', 'algorithm_ordering': u'maxside', 'debug': False, 'output': '/Users/noah/Documents/Bop/git/suitandtie/app/assets/spriteGeneration/sprites', 'margin': u'1', 'css_template': None, 'ignore_filename_paddings': False}
Args: ['/usr/local/bin/glue', 'assets/', 'sprites', '--margin=1', '--padding=1', '--retina', '--namespace=', '--sprite-namespace=', '--pseudo-class-separator=']

Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/glue/bin.py", line 235, in main
manager.process()
File "/Library/Python/2.7/site-packages/glue/managers/base.py", line 14, in process
self.save()
File "/Library/Python/2.7/site-packages/glue/managers/base.py", line 42, in save
format.validate()
File "/Library/Python/2.7/site-packages/glue/formats/css.py", line 142, in validate
class_names = [':'.join(self.generate_css_name(i.filename)) for i in self.sprite.images]
File "/Library/Python/2.7/site-packages/glue/formats/css.py", line 210, in generate_css_name
pseudo_classes = [p for p in filename.split(css_pseudo_class_separator) if p in self.css_pseudo_classes]
ValueError: empty separator

@nappels
Copy link
Author

nappels commented Jul 22, 2015

Realized this happened because I left out the value for for my separator. See the last option of the command I used:

glue assets/ sprites --margin=1 --padding=1 --retina --namespace='' --sprite-namespace='' --pseudo-class-separator=

where it should have been

glue assets/ sprites --margin=1 --padding=1 --retina --namespace='' --sprite-namespace='' --pseudo-class-separator=_

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

1 participant