Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.

/get_accident_counts call failing #78

@kmiyashiro

Description

@kmiyashiro

http://wigglemap.com/get_accident_counts returns 500

NoMethodError: undefined method `+' for nil:NilClass
    /home/eric/Projects/wigglemap/utils/accidents.rb:25:in `generate_polygon'
    /home/eric/Projects/wigglemap/utils/accidents.rb:18:in `block in get_accident_counts'
    /home/eric/Projects/wigglemap/utils/accidents.rb:17:in `each'
    /home/eric/Projects/wigglemap/utils/accidents.rb:17:in `get_accident_counts'
    app.rb:54:in `block in <main>'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:1265:in `call'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:1265:in `block in compile!'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in `[]'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in `block (3 levels) in route!'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:851:in `route_eval'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in `block (2 levels) in route!'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:872:in `block in process_route'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:870:in `catch'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:870:in `process_route'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:834:in `block in route!'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:833:in `each'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:833:in `route!'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:936:in `dispatch!'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:in `block in call!'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in `block in invoke'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in `catch'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in `invoke'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:in `call!'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:755:in `call'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:in `call'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:in `call'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in `call'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/logger.rb:15:in `call'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/commonlogger.rb:20:in `call'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:136:in `call'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:129:in `call'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/head.rb:9:in `call'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/showexceptions.rb:21:in `call'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:99:in `call'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:1389:in `block in call'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:1471:in `synchronize'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:1389:in `call'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in `call'
    /home/eric/.rvm/gems/ruby-1.9.3-p194/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in `block in spawn_threadpool

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions