Strange chars in FlightInfoStatusResult (note the chinese!) which give unicode error


#1

[12:06:58] [INFO] [dku.utils] - SWA2385
[12:06:59] [INFO] [dku.utils] - 1 flights found.
[12:06:59] [INFO] [dku.utils] - SWA2598
[12:06:59] [INFO] [dku.utils] - Error: <type ‘exceptions.UnicodeDecodeError’>
[12:06:59] [INFO] [dku.utils] - {“FlightInfoStatusResult”:{“next_offset”:-1,“flights”:[{“ident”:“SWA2598”,“faFlightID”:“SWA2598-1505971550-airline-0690”,“airline”:“SWA”,“flightnumber”:“2598”,“tailnumber”:“N440LV”,“type”:“Form_Airline”,“blocked”:false,“diverted”:false,“cancelled”:false,“origin”:{“code”:“KSDF”,“city”:“Louisville, KY”,“alternate_ident”:"",“airport_name”:“Louisville Intl”},“destination”:{“code”:“KTPA”,“city”:“Tampa, FL”,“alternate_ident”:"",“airport_name”:“Tampa Intl”},“filed_ete”:6600,“route”:“FEDRA3 OHAGI VXV ATL J43 SZW FOOXX4”,“filed_altitude”:350,“display_filed_altitude”:“35,000 feet”,“filed_airspeed_kts”:458,“distance_filed”:822,“filed_departure_time”:{“epoch”:1506173400,“tz”:“EDT”,“dow”:“Saturday”,“time”:“09時30分”,“date”:“09/23/2017”,“localtime”:1506159000},“estimated_departure_time”:{“epoch”:1506173820,“tz”:“EDT”,“dow”:“Saturday”,“time”:“09時37分”,“date”:“09/23/2017”,“localtime”:1506159420},“actual_departure_time”:{“epoch”:1506173820,“tz”:“EDT”,“dow”:“Saturday”,“time”:“09時37分”,“date”:“09/23/2017”,“localtime”:1506159420},“departure_delay”:-180,“filed_arrival_time”:{“epoch”:1506180000,“tz”:“EDT”,“dow”:“Saturday”,“time”:“11時20分”,“date”:“09/23/2017”,“localtime”:1506165600},“estimated_arrival_time”:{“epoch”:1506180060,“tz”:“EDT”,“dow”:“Saturday”,“time”:“11時21分”,“date”:“09/23/2017”,“localtime”:1506165660},“actual_arrival_time”:{“epoch”:1506180060,“tz”:“EDT”,“dow”:“Saturday”,“time”:“11時21分”,“date”:“09/23/2017”,“localtime”:1506165660},“arrival_delay”:-240,“status”:“Arrived”,“progress_percent”:100,“aircrafttype”:“B737”,“full_aircrafttype”:“B737”,“inbound_faFlightID”:“SWA2597-1505971550-airline-0523”,“adhoc”:false}]}}
[12:06:59] [INFO] [dku.utils] -
[12:06:59] [INFO] [dku.utils] - SWA2749
[12:07:00] [INFO] [dku.utils] - 3 flights found.

How does that happen? How should I filter this out?


#2

We have seen that occasionally occur in rare conditions, but we don’t have any timeframe for a fix since the cause is still unknown (a previous user’s locale setting is likely getting cached and reused for your session).

However, the response should still technically be valid Unicode/UTF-8 so I suspect you may still have a decoding issue on your side.


#3

Thanks for the answer. I am not entirely happy, since one of the things we are looking for in a high quality environment is consistency and predictability. I should not have to write code to deal with these data quality issues. (From my end of the line, that’s what it is!)


#4

Thanks for your feedback. Please keep in mind that FlightXML3 represents a beta quality product and is still under active development, so it should be expected that there may be some reliability issues with it still. If you prefer, our current production release of FlightXML2 is still available for signups.


#5

How often are you seeing those characters in the response?


#6

Not very often, in fact. I have stopped trying to decode the response.content and it works much better…