Error message on convert. #8

Closed
daylerees opened this Issue Jan 17, 2013 · 5 comments

Comments

Projects
None yet
5 participants

Hi! I'm trying to convert my TM themes to vim variants and I'm running into the following error :

/Users/dayle/.rvm/gems/ruby-1.9.3-p374/gems/color-tools-1.3.0/lib/color/rgb.rb:53:in `from_html': ArgumentError (ArgumentError)
    from /Users/dayle/.rvm/gems/ruby-1.9.3-p374/gems/coloration-0.3.2/lib/coloration/color_rgba.rb:5:in `from_html'
    from /Users/dayle/.rvm/gems/ruby-1.9.3-p374/gems/coloration-0.3.2/lib/coloration/readers/textmate_theme_reader.rb:22:in `block in parse_input'
    from /Users/dayle/.rvm/gems/ruby-1.9.3-p374/gems/coloration-0.3.2/lib/coloration/readers/textmate_theme_reader.rb:21:in `each'
    from /Users/dayle/.rvm/gems/ruby-1.9.3-p374/gems/coloration-0.3.2/lib/coloration/readers/textmate_theme_reader.rb:21:in `parse_input'
    from /Users/dayle/.rvm/gems/ruby-1.9.3-p374/gems/coloration-0.3.2/lib/coloration/abstract_converter.rb:28:in `convert!'
    from /Users/dayle/.rvm/gems/ruby-1.9.3-p374/gems/coloration-0.3.2/lib/coloration/abstract_converter.rb:13:in `process_cmd_line'
    from /Users/dayle/.rvm/gems/ruby-1.9.3-p374/gems/coloration-0.3.2/bin/tm2vim:5:in `<top (required)>'
    from /Users/dayle/.rvm/gems/ruby-1.9.3-p374/bin/tm2vim:19:in `load'
    from /Users/dayle/.rvm/gems/ruby-1.9.3-p374/bin/tm2vim:19:in `<main>'
    from /Users/dayle/.rvm/gems/ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in `eval'
    from /Users/dayle/.rvm/gems/ruby-1.9.3-p374/bin/ruby_noexec_wrapper:14:in `<main>'

Sorry if this is something obvious, I'm not a ruby dev!

Thanks!

osa1 commented Jan 24, 2013

I'm also getting a similar error:

➜  Color Scheme - Default  tm2vim Monokai.tmTheme 
/usr/lib64/ruby/gems/1.9.1/gems/color-tools-1.3.0/lib/color/rgb.rb:53:in `from_html': ArgumentError (ArgumentError)
        from /usr/lib64/ruby/gems/1.9.1/gems/coloration-0.3.2/lib/coloration/color_rgba.rb:5:in `from_html'
        from /usr/lib64/ruby/gems/1.9.1/gems/coloration-0.3.2/lib/coloration/readers/textmate_theme_reader.rb:22:in `block in parse_input'
        from /usr/lib64/ruby/gems/1.9.1/gems/coloration-0.3.2/lib/coloration/readers/textmate_theme_reader.rb:21:in `each'
        from /usr/lib64/ruby/gems/1.9.1/gems/coloration-0.3.2/lib/coloration/readers/textmate_theme_reader.rb:21:in `parse_input'
        from /usr/lib64/ruby/gems/1.9.1/gems/coloration-0.3.2/lib/coloration/abstract_converter.rb:28:in `convert!'
        from /usr/lib64/ruby/gems/1.9.1/gems/coloration-0.3.2/lib/coloration/abstract_converter.rb:13:in `process_cmd_line'
        from /usr/lib64/ruby/gems/1.9.1/gems/coloration-0.3.2/bin/tm2vim:5:in `<top (required)>'
        from /usr/bin/tm2vim:23:in `load'
        from /usr/bin/tm2vim:23:in `<main>'

higgisp commented Jan 24, 2013

/color-tools-1.3.0/lib/color/rgb.rb:53:in `from_html': ArgumentError (ArgumentError)

Same issue

Contributor

pthrasher commented Jan 29, 2013

Same here.

/Users/pthrasher/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/color-tools-1.3.0/lib/color/rgb.rb:53:in `from_html': ArgumentError (ArgumentError)
    from /Users/pthrasher/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/coloration-0.3.2/lib/coloration/color_rgba.rb:5:in `from_html'
    from /Users/pthrasher/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/coloration-0.3.2/lib/coloration/readers/textmate_theme_reader.rb:22:in `block in parse_input'
    from /Users/pthrasher/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/coloration-0.3.2/lib/coloration/readers/textmate_theme_reader.rb:21:in `each'
    from /Users/pthrasher/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/coloration-0.3.2/lib/coloration/readers/textmate_theme_reader.rb:21:in `parse_input'
    from /Users/pthrasher/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/coloration-0.3.2/lib/coloration/abstract_converter.rb:28:in `convert!'
    from /Users/pthrasher/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/coloration-0.3.2/lib/coloration/abstract_converter.rb:13:in `process_cmd_line'
    from /Users/pthrasher/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/coloration-0.3.2/bin/tm2vim:5:in `<top (required)>'
    from /Users/pthrasher/.rbenv/versions/1.9.3-p327/bin/tm2vim:23:in `load'
    from /Users/pthrasher/.rbenv/versions/1.9.3-p327/bin/tm2vim:23:in `<main>'
Contributor

pthrasher commented Jan 29, 2013

I made a pull request that fixes this issue. (#9)

The problem was that words like "underline" are getting passed back to the color routines that are expecting a hexadecimal hash.

So, I check the value of that variable to see if it is a color prior to sending it to the color back-end.

Owner

sickill commented Mar 13, 2013

@pthrasher merged and released new gem, thx!

sickill closed this Mar 13, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment