pedro2555 / vatsim-api

A RESTfull HTTP API providing VATSIM data.
GNU General Public License v2.0
2 stars 0 forks source link

Worker process failing #1

Open pedro2555 opened 5 years ago

pedro2555 commented 5 years ago

Description

Worker process failing.

Server Traceback

2019-05-28T17:51:03.385567+00:00 app[worker.1]: Traceback (most recent call last):
2019-05-28T17:51:03.385573+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/celery/app/trace.py", line 385, in trace_task
2019-05-28T17:51:03.385575+00:00 app[worker.1]:     R = retval = fun(*args, **kwargs)
2019-05-28T17:51:03.385576+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/celery/app/trace.py", line 648, in __protected_call__
2019-05-28T17:51:03.385578+00:00 app[worker.1]:     return self.run(*args, **kwargs)
2019-05-28T17:51:03.385580+00:00 app[worker.1]:   File "/app/src/tasks.py", line 38, in update
2019-05-28T17:51:03.385582+00:00 app[worker.1]:     status = VatsimStatus.from_url()
2019-05-28T17:51:03.385584+00:00 app[worker.1]:   File "/app/src/vatsim.py", line 84, in from_url
2019-05-28T17:51:03.385587+00:00 app[worker.1]:     return VatsimStatus([line.decode('utf-8', 'ignore') for line in file])
2019-05-28T17:51:03.385588+00:00 app[worker.1]:   File "/app/src/vatsim.py", line 63, in __init__
2019-05-28T17:51:03.385589+00:00 app[worker.1]:     line = vars(_current_module)[_section](line)
2019-05-28T17:51:03.385591+00:00 app[worker.1]:   File "/app/src/vatsim.py", line 143, in _split_clients
2019-05-28T17:51:03.385592+00:00 app[worker.1]:     result = _split_to_dict(keys, line)
2019-05-28T17:51:03.385593+00:00 app[worker.1]:   File "/app/src/vatsim.py", line 88, in _split_to_dict
2019-05-28T17:51:03.385595+00:00 app[worker.1]:     assert len(keys) == len(values), f'{len(keys)} != {len(values)} for {line}'
2019-05-28T17:51:03.385597+00:00 app[worker.1]: AssertionError: 41 != 42 for

Affecting line

KORD_ATIS:1165529:Jamar Finch:ATC:135.400:41.97933:-87.90739:0:::0::::USA-W:100:5::4:0::::::::::::::::ORD ATIS INFO F 281651. 04408KT 10SM BKN020 OVC250 17/13 A2977^(TWO NINER SEVEN SEVEN).. ARR EXPECT VECTORS ILS RWY 9R APCH,^ILS RWY 10L APCH, RUNWAY 10C AND 10R AVAILABLE UPON REQUEST,^SIMUL APCHS IN USE. READBACK ALL RWY HOLD SHORT INSTRUCTIONS.^DEPS EXPECT RWYS 9R, 10L FROM DELTA-DELTA. TEN THOUSAND AND^NINETY THREE FEET AVAILABLE. SIMULTANEOUS PARALLEL DEPARTURES IN^$ rw.liveatc.net/KORD_ATIS^USE. NOTAMS... NOTAMS: RWY 4L, 22R CLSD. RWY 9R GS OTS. ALL^RUNWAYS, COND CODE, 5, 5, 5. AT 0105Z .. PILOTS USE CTN FOR BIRD^ACTIVITY IN THE VICINITY OF THE ARPT. HAZD WX INFO FOR ORD AREA^AVBL ON HIWAS OR FSS. USE CAUTION FOR MEN AND EQUIP AT NUMEROUS^SITES ON THE FIELD. WHEN READY TO TAXI CONTACT GND METERING ON^FREQ 119.00. ...ADVS YOU HAVE INFO F.:20190528174508:20190528165935:::
pedro2555 commented 5 years ago

Update

An effort was made to not crash the worker., and continue processing the rest of the file.

Introduced in 531630f, already in production.

The new server message follows.

2019-05-28T18:14:01.116215+00:00 app[worker.1]: [2019-05-28 18:14:01,115: INFO/ForkPoolWorker-5] unparseable line 41 != 42 for KORD_ATIS:1165529:Jamar Finch:ATC:135.400:41.97933:-87.90739:0:::0::::USA-W:100:5::4:0::::::::::::::::$ rw.liveatc.net/KORD_ATIS^ORD ATIS INFO F 281651. 04408KT 10SM BKN020 OVC250 17/13 A2977^(TWO NINER SEVEN SEVEN).. ARR EXPECT VECTORS ILS RWY 9R APCH,^ILS RWY 10L APCH, RUNWAY 10C AND 10R AVAILABLE UPON REQUEST,^SIMUL APCHS IN USE. READBACK ALL RWY HOLD SHORT INSTRUCTIONS.^DEPS EXPECT RWYS 9R, 10L FROM DELTA-DELTA. TEN THOUSAND AND^NINETY THREE FEET AVAILABLE. SIMULTANEOUS PARALLEL DEPARTURES IN^USE. NOTAMS... NOTAMS: RWY 4L, 22R CLSD. RWY 9R GS OTS. ALL^RUNWAYS, COND CODE, 5, 5, 5. AT 0105Z .. PILOTS USE CTN FOR BIRD^ACTIVITY IN THE VICINITY OF THE ARPT. HAZD WX INFO FOR ORD AREA^AVBL ON HIWAS OR FSS. USE CAUTION FOR MEN AND EQUIP AT NUMEROUS^SITES ON THE FIELD. WHEN READY TO TAXI CONTACT GND METERING ON^FREQ 119.00. ...ADVS YOU HAVE INFO F.:20190528180021:20190528165935:::