borgand/inkscape_merge

ERROR: can't convert Hash into Integer

MurzNN opened this issue · 3 comments

I have run:
$ inkscape_merge -f template.svg -d data.csv -o out.pdf
and got the error:
ERROR: can't convert Hash into Integer

I have use Ubuntu 11.10 AMD64. How I can solve or debug this error?

Sadly I can't reproduce this issue myself, so I have added verbosity to error messages.
Please update your gem to 0.1.2 and try again while providing the -v option. Please paste the result here.

I am having this issue as well (but I am on a Mac running 10.8.4). I am using 0.1.2 and below is the output of using the -v option:

inkscape_merge -f card.svg -d names.csv -o cards/card_%d.pdf -v
ERROR: can't convert Hash into Integer
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/csv.rb:98:in read' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/csv.rb:98:inread'
/Library/Ruby/Gems/1.8/gems/inkscape_merge-0.1.2/bin/../lib/inkscape_merge/data_parsers.rb:26:in initialize' /Library/Ruby/Gems/1.8/gems/inkscape_merge-0.1.2/bin/../lib/inkscape_merge/data_parsers.rb:13:innew'
/Library/Ruby/Gems/1.8/gems/inkscape_merge-0.1.2/bin/../lib/inkscape_merge/data_parsers.rb:13:in detect' /Library/Ruby/Gems/1.8/gems/inkscape_merge-0.1.2/bin/../lib/inkscape_merge/processor.rb:38:inrun'
/Library/Ruby/Gems/1.8/gems/inkscape_merge-0.1.2/bin/inkscape_merge:43
/usr/bin/inkscape_merge:19:in `load'
/usr/bin/inkscape_merge:19

Turns out the errors are because of Ruby 1.8, which has different CSV library. 0.1.3 fixes this by requiring FasterCSV in 1.8.