transitland / transitland-datastore

Transitland v1 core components. Deprecated and only maintained occasionally. See Transitland v2.
https://transit.land/documentation/datastore/
MIT License
105 stars 18 forks source link

RouteStopPattern gtfs_shape_dist_traveled: seg_index is nil #1020

Closed irees closed 7 years ago

irees commented 7 years ago
{:exception_log=>"\nno implicit conversion from nil to integer\n[\"/www/transitland/releases/20170308185533/config/initializers/rgeo.rb:15:in `[]'\", \"/www/transitland/releases/20170308185533/config/initializers/rgeo.rb:15:in `closest_point_on_segment'\", \"/www/transitland/releases/20170308185533/app/models/route_stop_pattern.rb:192:in `block in gtfs_shape_dist_traveled'\", \"/www/transitland/releases/20170308185533/app/models/route_stop_pattern.rb:183:in `each'\", \"/www/transitland/releases/20170308185533/app/models/route_stop_pattern.rb:183:in `each_with_index'\", \"/www/transitland/releases/20170308185533/app/models/route_stop_pattern.rb:183:in `gtfs_shape_dist_traveled'\", \"/www/transitland/releases/20170308185533/app/services/gtfs_graph.rb:558:in `block in load_tl_route_stop_patterns'\", \"/home/deploy/.bundler/transitland/ruby/2.3.0/bundler/gems/gtfs-c83e414378ef/lib/gtfs/source.rb:283:in `block in trip_stop_times'\", 
...

see https://github.com/transitland/transitland-datastore/blob/master/app/models/route_stop_pattern.rb#L182

Related to Netherlands import: https://github.com/transitland/transitland/issues/27

drewda commented 7 years ago

An import error on dev that may be related:

https://sentry.io/mapzen/datastore-dev/issues/232942581/

feed: f-dqc-wmata feed version: bda39fdb238feb4b6d38f07fe4c5cde62c5bbca5

ArgumentError: comparison of Float with nil failed
  from app/models/route_stop_pattern.rb:180:in `<='
  from app/models/route_stop_pattern.rb:180:in `block (2 levels) in gtfs_shape_dist_traveled'
  from app/models/route_stop_pattern.rb:179:in `each'
  from app/models/route_stop_pattern.rb:179:in `detect'
  from app/models/route_stop_pattern.rb:179:in `block in gtfs_shape_dist_traveled'
  from app/models/route_stop_pattern.rb:176:in `each'
  from app/models/route_stop_pattern.rb:176:in `each_with_index'
  from app/models/route_stop_pattern.rb:176:in `gtfs_shape_dist_traveled'
  from app/services/gtfs_graph.rb:558:in `block in load_tl_route_stop_patterns'
  from gtfs/source.rb:283:in `block in trip_stop_times'
  from gtfs/source.rb:279:in `each'
  from gtfs/source.rb:279:in `trip_stop_times'
  from app/services/gtfs_graph.rb:539:in `load_tl_route_stop_patterns'
  from app/services/gtfs_graph.rb:90:in `create_change_osr'
  from app/workers/feed_eater_worker.rb:29:in `perform'
  from sidekiq/processor.rb:158:in `execute_job'
  from sidekiq/processor.rb:138:in `block (4 levels) in process'
  from sidekiq.rb:36:in `block in <module:Sidekiq>'
  from sidekiq/processor.rb:133:in `block (3 levels) in process'
  from sidekiq/middleware/chain.rb:128:in `block in invoke'
  from sidekiq/middleware/server/active_record.rb:6:in `call'
  from sidekiq/middleware/chain.rb:130:in `block in invoke'
  from raven/integrations/sidekiq.rb:7:in `call'
  from sidekiq/middleware/chain.rb:130:in `block in invoke'
  from sidekiq_unique_jobs/lock/until_and_while_executing.rb:8:in `block in execute'
  from sidekiq_unique_jobs/lock/while_executing.rb:19:in `synchronize'
  from sidekiq_unique_jobs/lock/until_and_while_executing.rb:6:in `execute'
  from sidekiq_unique_jobs/server/middleware.rb:16:in `call'
  from sidekiq/middleware/chain.rb:130:in `block in invoke'
  from sidekiq/middleware/server/retry_jobs.rb:74:in `call'
  from sidekiq/middleware/chain.rb:130:in `block in invoke'
  from sidekiq/middleware/server/logging.rb:11:in `block in call'
  from sidekiq/logging.rb:32:in `with_context'
  from sidekiq/middleware/server/logging.rb:7:in `call'
  from sidekiq/middleware/chain.rb:130:in `block in invoke'
  from sidekiq/middleware/chain.rb:133:in `invoke'
  from sidekiq/processor.rb:132:in `block (2 levels) in process'
  from sidekiq/processor.rb:174:in `stats'
  from sidekiq/processor.rb:131:in `block in process'
  from sidekiq.rb:35:in `block in <module:Sidekiq>'
  from sidekiq/processor.rb:126:in `process'
  from sidekiq/processor.rb:82:in `process_one'
  from sidekiq/processor.rb:70:in `run'
  from sidekiq/util.rb:17:in `watchdog'
  from sidekiq/util.rb:26:in `block in safe_thread'
drewda commented 7 years ago

https://sentry.io/mapzen/datastore-prod/issues/232145273/