deanmalmgren/marey-metra

KeyError 'train_num' related to script starting an hour early?

Closed this issue · 1 comments

Train 10 doesn't start until 4:48

Script started at 2015-02-24 03:43:02.032997.
Exception raised when querying the rail time tracker for trip UP-W_UW10_V1 traveling from ELBURN to OTC.

                ELBURN                  None                  None
                 LAFOX                  None                  None
                GENEVA                  None                  None
              WCHICAGO                  None                  None
              WINFIELD                  None                  None
               WHEATON                  None                  None
            COLLEGEAVE                  None                  None
             GLENELLYN                  None                  None
               LOMBARD                  None                  None
             VILLAPARK                  None                  None
              ELMHURST                  None                  None
              BERKELEY                  None                  None
              BELLWOOD                  None                  None
             MELROSEPK                  None                  None
               MAYWOOD                  None                  None
            RIVRFOREST                  None                  None
               OAKPARK                  None                  None
                KEDZIE                  None                  None
                   OTC                  None                  None



Response (200) back from server:

{
  "train1": {
    "error": "There are no trains available for the selected stops.  Please change your search and try again.",
    "status": 0
  }
}



--------------------------------------------------------------------------------

Traceback (most recent call last):
  File "./manage.py", line 9, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/srv/www/marey-metra/web/base/management/commands/query_rail_time_tracker.py", line 65, in handle
    self.query_all_trains()
  File "/srv/www/marey-metra/web/base/management/commands/query_rail_time_tracker.py", line 91, in query_all_trains
    raise e
KeyError: 'train_num'

duplicate of #10