yostudios / Spritemapper

CSS Spritemap Generator
http://yostudios.github.com/Spritemapper/
MIT License
595 stars 42 forks source link

fail with extjs-3.4.0 #13

Open benbro opened 13 years ago

benbro commented 13 years ago

I'm trying to use spritemapper with extjs-3.40 and it "invalid transition" error. extjs-3.4.0 can be downloaded from: http://extjs.cachefly.net/ext-3.4.0.zip

The error I'm getting:

~/Downloads/ext-3.4.0/resources/css$ spritemapper ext-all.css
Traceback (most recent call last):
  File "/usr/local/bin/spritemapper", line 9, in <module>
    load_entry_point('spritemapper==1.0.0', 'console_scripts', 'spritemapper')()
  File "/usr/local/lib/python2.7/dist-packages/spritemapper-1.0.0-py2.7.egg/spritecss/main.py", line 141, in main
    spritemap([css_cls.open_file(fn, conf=conf) for fn in args], conf=conf)
  File "/usr/local/lib/python2.7/dist-packages/spritemapper-1.0.0-py2.7.egg/spritecss/main.py", line 33, in open_file
    return cls(fname, conf=CSSConfig(p, base=conf, fname=fname))
  File "/usr/local/lib/python2.7/dist-packages/spritemapper-1.0.0-py2.7.egg/spritecss/config.py", line 28, in __init__
    self._data.update(iter_css_config(parser))
  File "/usr/local/lib/python2.7/dist-packages/spritemapper-1.0.0-py2.7.egg/spritecss/config.py", line 17, in iter_css_config
    for ev in iter_events(parser, lexemes=("comment",)):
  File "/usr/local/lib/python2.7/dist-packages/spritemapper-1.0.0-py2.7.egg/spritecss/css/parser.py", line 43, in iter_events
    self._emit_events()
  File "/usr/local/lib/python2.7/dist-packages/spritemapper-1.0.0-py2.7.egg/spritecss/css/parser.py", line 410, in _emit_events
    self.state = self.evaluate()
  File "/usr/local/lib/python2.7/dist-packages/spritemapper-1.0.0-py2.7.egg/spritecss/css/parser.py", line 431, in evaluate
    raise RuntimeError("invalid transition from %r" % (st,))
RuntimeError: invalid transition from <CSSParseState handler=<bound method CSSParser._handle_whitespace of <spritecss.css.parser.CSSParser object at 0x136fa50>>, prev=<CSSParseState handler=None, prev=None, counter=147, tokens=<generator object _css_tokenizer_lineno at 0x1368c30>, token=Token('comment_end', '*/', line_no=74, col_no=57), selector='.x-hide-nosize,\n.x-hide-nosize *     Emulate display:none for children ', declaration='', at_rule='', comment='', whitespace=''>, counter=146, tokens=<generator object _css_tokenizer_lineno at 0x1368c30>, token=Token('char', ' ', line_no=74, col_no=22), selector='', declaration='', at_rule='', comment='', whitespace=''>
jnordberg commented 13 years ago

Probably related to #12

lericson commented 13 years ago

What do you mean, are you running the spritemapper on a JavaScript?

benbro commented 13 years ago

extjs is a js framework which includes ext-all.css I'm running spritemapper on that css file.

You can download the file from: http://dev.sencha.com/deploy/ext-3.4.0/resources/css/ext-all.css

and the complete lib with all css and images from: http://extjs.cachefly.net/ext-3.4.0.zip

betweenbrain commented 12 years ago

I'm getting the same thing on a fairly straight forward Xubuntu 12.04 install. Possibly related?