isawnyu / geocollider

Discover potential matches between multiple place databases
MIT License
5 stars 2 forks source link

CSVParser: No implicit conversion of String into Integer #7

Closed ryanfb closed 7 years ago

ryanfb commented 7 years ago

From geocollider-sinatra processing:

redacted - - [03/Feb/2017:14:48:08 -0500] "POST /upload HTTP/1.1" 200 1978 0.0032
redacted - - [03/Feb/2017:14:48:08 -0500] "GET /assets/app.js HTTP/1.1" 304 - 0.0119
{"csvfile"=>"/var/folders/jz/gt8bxzkj0p1g7dktng7wpptw0000gn/T/test_20170203-83047-11agp29.csv", "separator"=>"comma", "headers"=>"true", "quote_char"=>"", "lat"=>"latitude", "lon"=>"longitude", "id"=>"facility_name", "names"=>"facility_name", "algorithm"=>"place"}
{:separator=>",", :quote_char=>"\uFFFF", :names=>["facility_name"], :lat=>"latitude", :lon=>"longitude", :id=>"facility_name"}
2017-02-03 14:48:30 - TypeError - no implicit conversion of String into Integer:
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/geocollider-e25ff6c3567f/lib/parsers/csv_parser.rb:61:in `[]'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/geocollider-e25ff6c3567f/lib/parsers/csv_parser.rb:61:in `block (2 levels) in parse'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/2.3.0/csv.rb:1748:in `each'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/2.3.0/csv.rb:1312:in `parse'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/geocollider-e25ff6c3567f/lib/parsers/csv_parser.rb:59:in `block in parse'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/geocollider-e25ff6c3567f/lib/parsers/csv_parser.rb:55:in `each'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/geocollider-e25ff6c3567f/lib/parsers/csv_parser.rb:55:in `parse'
        /Users/ryan/source/dc3/geocollider-sinatra/geocollider-sinatra.rb:78:in `block (3 levels) in <class:GeocolliderSinatra>'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/2.3.0/csv.rb:1282:in `open'
        /Users/ryan/source/dc3/geocollider-sinatra/geocollider-sinatra.rb:73:in `block (2 levels) in <class:GeocolliderSinatra>'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tempfile.rb:295:in `open'
        /Users/ryan/source/dc3/geocollider-sinatra/geocollider-sinatra.rb:72:in `block in <class:GeocolliderSinatra>'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in `block in compile!'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `block (3 levels) in route!'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:994:in `route_eval'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `block (2 levels) in route!'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1015:in `block in process_route'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in `catch'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in `process_route'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:973:in `block in route!'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in `each'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in `route!'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1085:in `block in dispatch!'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `block in invoke'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `catch'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `invoke'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1082:in `dispatch!'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in `block in call!'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `block in invoke'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `catch'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `invoke'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in `call!'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:895:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.5/lib/rack/nulllogger.rb:9:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.5/lib/rack/head.rb:13:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:182:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:2013:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-attack-5.0.1/lib/rack/attack.rb:147:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.5/lib/rack/tempfile_reaper.rb:15:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.5/lib/rack/lint.rb:49:in `_call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.5/lib/rack/lint.rb:37:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.5/lib/rack/showexceptions.rb:24:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.5/lib/rack/commonlogger.rb:33:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-1.4.8/lib/sinatra/base.rb:219:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.5/lib/rack/chunked.rb:54:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.5/lib/rack/content_length.rb:15:in `call'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rack-1.6.5/lib/rack/handler/webrick.rb:88:in `service'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/2.3.0/webrick/httpserver.rb:140:in `service'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/2.3.0/webrick/httpserver.rb:96:in `run'
        /Users/ryan/.rbenv/versions/2.3.1/lib/ruby/2.3.0/webrick/server.rb:296:in `block in start_thread'
redacted - - [03/Feb/2017:14:48:30 -0500] "POST /process HTTP/1.1" 500 30 0.0059
{"csvfile"=>"/var/folders/jz/gt8bxzkj0p1g7dktng7wpptw0000gn/T/test_20170203-83047-11agp29.csv", "separator"=>"comma", "headers"=>"true", "quote_char"=>"", "lat"=>"0", "lon"=>"4", "id"=>"3", "names"=>"3", "algorithm"=>"place"}
{:separator=>",", :quote_char=>"\uFFFF", :names=>["3"], :lat=>"0", :lon=>"4", :id=>"3"}
redacted - - [03/Feb/2017:14:48:59 -0500] "POST /process HTTP/1.1" 200 - 0.0031