"uk-train-departure-display" project no longer works (2nd day)

Hello to everyone at Balena and the forums,

I have one of the train departure boards using the Balena Trains projects which stopped working yesterday afternoon. At some point between approx 8:30 and 16:00 (when I don’t tend to use it) it acquired the following fault:

17.02.22 08:35:46 (+0000) Supervisor starting
17.02.22 08:33:44 (+0000)  main  Error: Expecting value: line 1 column 1 (char 0)
17.02.22 08:34:38 (+0000)  main  Error: Expecting value: line 1 column 1 (char 0)
17.02.22 08:35:15 (+0000)  main  Error: Expecting value: line 1 column 1 (char 0)
17.02.22 08:35:51 (+0000)  main  Error: Expecting value: line 1 column 1 (char 0)
17.02.22 08:36:10 (+0000) Service exited 'main sha256:7f423474acbd9b81ce6a32ccaf9897d3acfd2792480a96f80b7c70dde80375d3'
17.02.22 08:36:10 (+0000) Restarting service 'main sha256:7f423474acbd9b81ce6a32ccaf9897d3acfd2792480a96f80b7c70dde80375d3'
17.02.22 08:35:51 (+0000)  main  Error: Expecting value: line 1 column 1 (char 0)
17.02.22 08:36:19 (+0000)  main  Error: Expecting value: line 1 column 1 (char 0)
17.02.22 08:36:23 (+0000) Service exited 'main sha256:7f423474acbd9b81ce6a32ccaf9897d3acfd2792480a96f80b7c70dde80375d3'
17.02.22 08:36:31 (+0000) Restarting service 'main sha256:7f423474acbd9b81ce6a32ccaf9897d3acfd2792480a96f80b7c70dde80375d3'
17.02.22 08:36:19 (+0000)  main  Error: Expecting value: line 1 column 1 (char 0)
17.02.22 08:36:38 (+0000)  main  Error: Expecting value: line 1 column 1 (char 0)
17.02.22 08:36:41 (+0000) Service exited 'main sha256:7f423474acbd9b81ce6a32ccaf9897d3acfd2792480a96f80b7c70dde80375d3'
17.02.22 08:36:50 (+0000) Restarting service 'main sha256:7f423474acbd9b81ce6a32ccaf9897d3acfd2792480a96f80b7c70dde80375d3'
17.02.22 08:36:38 (+0000)  main  Error: Expecting value: line 1 column 1 (char 0)
17.02.22 08:36:57 (+0000)  main  Error: Expecting value: line 1 column 1 (char 0)
17.02.22 08:37:01 (+0000) Service exited 'main sha256:7f423474acbd9b81ce6a32ccaf9897d3acfd2792480a96f80b7c70dde80375d3'
17.02.22 08:37:10 (+0000) Restarting service 'main sha256:7f423474acbd9b81ce6a32ccaf9897d3acfd2792480a96f80b7c70dde80375d3'
17.02.22 08:36:57 (+0000)  main  Error: Expecting value: line 1 column 1 (char 0)

It is stuck in that loop and is displaying nothing on the display. In all other respects the device itself seems to be working OK and it successfully updated itself to the latest builds when I swapped out the microSD card to rule that out. But alas, no train information again today.

I have now rebuilt the entire deployment using the latest changes to the GitHub source (using the “Deploy with Balena” control here) and the unit is now displaying a “Powered by National Rail Enquiries” splash screen but throws the following on the terminal:

17.02.22 09:12:39 (+0000) Supervisor starting
17.02.22 09:13:04 (+0000) Applying configuration change {"SUPERVISOR_POLL_INTERVAL":"900000","SUPERVISOR_DELTA":"1","SUPERVISOR_DELTA_REQUEST_TIMEOUT":"59000","SUPERVISOR_DELTA_VERSION":"3"}
17.02.22 09:13:04 (+0000) Applied configuration change {"SUPERVISOR_POLL_INTERVAL":"900000","SUPERVISOR_DELTA":"1","SUPERVISOR_DELTA_REQUEST_TIMEOUT":"59000","SUPERVISOR_DELTA_VERSION":"3"}
17.02.22 09:13:12 (+0000) Applying configuration change {"SUPERVISOR_VPN_CONTROL":"true"}
17.02.22 09:13:12 (+0000) Applied configuration change {"SUPERVISOR_VPN_CONTROL":"true"}
17.02.22 09:13:15 (+0000) Creating volume 'resin-data'
17.02.22 09:13:15 (+0000) Creating network 'default'
17.02.22 09:13:16 (+0000) Downloading image 'registry2.balena-cloud.com/v2/663ab9813c130d4bdc2d7359dc59fe07@sha256:df4923ffca2041a8399f8586ae56bd263c28dba9635274b4c8e91baf24173afc'
17.02.22 09:17:05 (+0000) Downloaded image 'registry2.balena-cloud.com/v2/663ab9813c130d4bdc2d7359dc59fe07@sha256:df4923ffca2041a8399f8586ae56bd263c28dba9635274b4c8e91baf24173afc'
17.02.22 09:17:08 (+0000) Installing service 'main sha256:a81bf2d9e5b7a429390458eec7305b75260b4bfa3eb5d41cbab0db371e6d0194'
17.02.22 09:17:09 (+0000) Installed service 'main sha256:a81bf2d9e5b7a429390458eec7305b75260b4bfa3eb5d41cbab0db371e6d0194'
17.02.22 09:17:09 (+0000) Starting service 'main sha256:a81bf2d9e5b7a429390458eec7305b75260b4bfa3eb5d41cbab0db371e6d0194'
17.02.22 09:17:17 (+0000) Started service 'main sha256:a81bf2d9e5b7a429390458eec7305b75260b4bfa3eb5d41cbab0db371e6d0194'
17.02.22 09:17:35 (+0000)  main  Starting Train Departure Display v0.3.0
17.02.22 09:17:42 (+0000)  main  Effective FPS: 0.0
17.02.22 09:17:43 (+0000)  main  Traceback (most recent call last):
17.02.22 09:17:43 (+0000)  main    File "src/main.py", line 370, in <module>
17.02.22 09:17:43 (+0000)  main      data = loadData(config["api"], config["journey"], config)
17.02.22 09:17:43 (+0000)  main    File "src/main.py", line 164, in loadData
17.02.22 09:17:43 (+0000)  main      journeyConfig, apiConfig["apiKey"], rows)
17.02.22 09:17:43 (+0000)  main    File "/src/trains.py", line 171, in loadDeparturesForStation
17.02.22 09:17:43 (+0000)  main      Departures, departureStationName = ProcessDepartures(APIOut)
17.02.22 09:17:43 (+0000)  main    File "/src/trains.py", line 33, in ProcessDepartures
17.02.22 09:17:43 (+0000)  main      departureStationName = APIElements['soap:Envelope']['soap:Body']['GetDepBoardWithDetailsResponse']['GetStationBoardResult']['lt4:locationName']
17.02.22 09:17:43 (+0000)  main  KeyError: 'soap:Envelope'
17.02.22 09:17:48 (+0000) Service exited 'main sha256:a81bf2d9e5b7a429390458eec7305b75260b4bfa3eb5d41cbab0db371e6d0194'
17.02.22 09:17:58 (+0000) Restarting service 'main sha256:a81bf2d9e5b7a429390458eec7305b75260b4bfa3eb5d41cbab0db371e6d0194'
17.02.22 09:18:02 (+0000)  main  Starting Train Departure Display v0.3.0
17.02.22 09:18:08 (+0000)  main  Effective FPS: 0.0
17.02.22 09:18:09 (+0000)  main  Traceback (most recent call last):
17.02.22 09:18:09 (+0000)  main    File "src/main.py", line 370, in <module>
17.02.22 09:18:09 (+0000)  main      data = loadData(config["api"], config["journey"], config)
17.02.22 09:18:09 (+0000)  main    File "src/main.py", line 164, in loadData
17.02.22 09:18:09 (+0000)  main      journeyConfig, apiConfig["apiKey"], rows)
17.02.22 09:18:09 (+0000)  main    File "/src/trains.py", line 171, in loadDeparturesForStation
17.02.22 09:18:09 (+0000)  main      Departures, departureStationName = ProcessDepartures(APIOut)
17.02.22 09:18:09 (+0000)  main    File "/src/trains.py", line 33, in ProcessDepartures
17.02.22 09:18:09 (+0000)  main      departureStationName = APIElements['soap:Envelope']['soap:Body']['GetDepBoardWithDetailsResponse']['GetStationBoardResult']['lt4:locationName']
17.02.22 09:18:09 (+0000)  main  KeyError: 'soap:Envelope'
17.02.22 09:18:22 (+0000) Service exited 'main sha256:a81bf2d9e5b7a429390458eec7305b75260b4bfa3eb5d41cbab0db371e6d0194'
17.02.22 09:18:22 (+0000) Restarting service 'main sha256:a81bf2d9e5b7a429390458eec7305b75260b4bfa3eb5d41cbab0db371e6d0194'
17.02.22 09:18:25 (+0000)  main  Starting Train Departure Display v0.3.0
17.02.22 09:18:31 (+0000)  main  Effective FPS: 0.0
17.02.22 09:18:31 (+0000)  main  Traceback (most recent call last):
17.02.22 09:18:31 (+0000)  main    File "src/main.py", line 370, in <module>
17.02.22 09:18:31 (+0000)  main      data = loadData(config["api"], config["journey"], config)
17.02.22 09:18:31 (+0000)  main    File "src/main.py", line 164, in loadData
17.02.22 09:18:31 (+0000)  main      journeyConfig, apiConfig["apiKey"], rows)
17.02.22 09:18:31 (+0000)  main    File "/src/trains.py", line 171, in loadDeparturesForStation
17.02.22 09:18:31 (+0000)  main      Departures, departureStationName = ProcessDepartures(APIOut)
17.02.22 09:18:31 (+0000)  main    File "/src/trains.py", line 33, in ProcessDepartures
17.02.22 09:18:31 (+0000)  main      departureStationName = APIElements['soap:Envelope']['soap:Body']['GetDepBoardWithDetailsResponse']['GetStationBoardResult']['lt4:locationName']
17.02.22 09:18:31 (+0000)  main  KeyError: 'soap:Envelope'
17.02.22 09:18:37 (+0000) Service exited 'main sha256:a81bf2d9e5b7a429390458eec7305b75260b4bfa3eb5d41cbab0db371e6d0194'
17.02.22 09:18:46 (+0000) Restarting service 'main sha256:a81bf2d9e5b7a429390458eec7305b75260b4bfa3eb5d41cbab0db371e6d0194'
17.02.22 09:18:48 (+0000)  main  Starting Train Departure Display v0.3.0
17.02.22 09:18:54 (+0000)  main  Effective FPS: 0.0
17.02.22 09:18:55 (+0000)  main  Traceback (most recent call last):
17.02.22 09:18:55 (+0000)  main    File "src/main.py", line 370, in <module>
17.02.22 09:18:55 (+0000)  main      data = loadData(config["api"], config["journey"], config)
17.02.22 09:18:55 (+0000)  main    File "src/main.py", line 164, in loadData
17.02.22 09:18:55 (+0000)  main      journeyConfig, apiConfig["apiKey"], rows)
17.02.22 09:18:55 (+0000)  main    File "/src/trains.py", line 171, in loadDeparturesForStation
17.02.22 09:18:55 (+0000)  main      Departures, departureStationName = ProcessDepartures(APIOut)
17.02.22 09:18:55 (+0000)  main    File "/src/trains.py", line 33, in ProcessDepartures
17.02.22 09:18:55 (+0000)  main      departureStationName = APIElements['soap:Envelope']['soap:Body']['GetDepBoardWithDetailsResponse']['GetStationBoardResult']['lt4:locationName']
17.02.22 09:18:55 (+0000)  main  KeyError: 'soap:Envelope'
17.02.22 09:18:59 (+0000) Service exited 'main sha256:a81bf2d9e5b7a429390458eec7305b75260b4bfa3eb5d41cbab0db371e6d0194'
17.02.22 09:19:08 (+0000) Restarting service 'main sha256:a81bf2d9e5b7a429390458eec7305b75260b4bfa3eb5d41cbab0db371e6d0194'
17.02.22 09:19:11 (+0000)  main  Starting Train Departure Display v0.3.0
17.02.22 09:19:17 (+0000)  main  Effective FPS: 0.0
17.02.22 09:19:17 (+0000)  main  Traceback (most recent call last):
17.02.22 09:19:17 (+0000)  main    File "src/main.py", line 370, in <module>
17.02.22 09:19:17 (+0000)  main      data = loadData(config["api"], config["journey"], config)
17.02.22 09:19:17 (+0000)  main    File "src/main.py", line 164, in loadData
17.02.22 09:19:17 (+0000)  main      journeyConfig, apiConfig["apiKey"], rows)
17.02.22 09:19:17 (+0000)  main    File "/src/trains.py", line 171, in loadDeparturesForStation
17.02.22 09:19:17 (+0000)  main      Departures, departureStationName = ProcessDepartures(APIOut)
17.02.22 09:19:17 (+0000)  main    File "/src/trains.py", line 33, in ProcessDepartures
17.02.22 09:19:17 (+0000)  main      departureStationName = APIElements['soap:Envelope']['soap:Body']['GetDepBoardWithDetailsResponse']['GetStationBoardResult']['lt4:locationName']
17.02.22 09:19:17 (+0000)  main  KeyError: 'soap:Envelope'
17.02.22 09:19:44 (+0000) Service exited 'main sha256:a81bf2d9e5b7a429390458eec7305b75260b4bfa3eb5d41cbab0db371e6d0194'
17.02.22 09:19:45 (+0000) Restarting service 'main sha256:a81bf2d9e5b7a429390458eec7305b75260b4bfa3eb5d41cbab0db371e6d0194'
17.02.22 09:19:48 (+0000)  main  Starting Train Departure Display v0.3.0
17.02.22 09:19:54 (+0000)  main  Effective FPS: 0.0
17.02.22 09:19:55 (+0000)  main  Traceback (most recent call last):
17.02.22 09:19:55 (+0000)  main    File "src/main.py", line 370, in <module>
17.02.22 09:19:55 (+0000)  main      data = loadData(config["api"], config["journey"], config)
17.02.22 09:19:55 (+0000)  main    File "src/main.py", line 164, in loadData
17.02.22 09:19:55 (+0000)  main      journeyConfig, apiConfig["apiKey"], rows)
17.02.22 09:19:55 (+0000)  main    File "/src/trains.py", line 171, in loadDeparturesForStation
17.02.22 09:19:55 (+0000)  main      Departures, departureStationName = ProcessDepartures(APIOut)
17.02.22 09:19:55 (+0000)  main    File "/src/trains.py", line 33, in ProcessDepartures
17.02.22 09:19:55 (+0000)  main      departureStationName = APIElements['soap:Envelope']['soap:Body']['GetDepBoardWithDetailsResponse']['GetStationBoardResult']['lt4:locationName']
17.02.22 09:19:55 (+0000)  main  KeyError: 'soap:Envelope'
17.02.22 09:19:59 (+0000) Service exited 'main sha256:a81bf2d9e5b7a429390458eec7305b75260b4bfa3eb5d41cbab0db371e6d0194'
17.02.22 09:20:07 (+0000) Restarting service 'main sha256:a81bf2d9e5b7a429390458eec7305b75260b4bfa3eb5d41cbab0db371e6d0194'
17.02.22 09:20:11 (+0000)  main  Starting Train Departure Display v0.3.0
17.02.22 09:20:16 (+0000)  main  Effective FPS: 0.0
17.02.22 09:20:17 (+0000)  main  Traceback (most recent call last):
17.02.22 09:20:17 (+0000)  main    File "src/main.py", line 370, in <module>
17.02.22 09:20:17 (+0000)  main      data = loadData(config["api"], config["journey"], config)
17.02.22 09:20:17 (+0000)  main    File "src/main.py", line 164, in loadData
17.02.22 09:20:17 (+0000)  main      journeyConfig, apiConfig["apiKey"], rows)
17.02.22 09:20:17 (+0000)  main    File "/src/trains.py", line 171, in loadDeparturesForStation
17.02.22 09:20:17 (+0000)  main      Departures, departureStationName = ProcessDepartures(APIOut)
17.02.22 09:20:17 (+0000)  main    File "/src/trains.py", line 33, in ProcessDepartures
17.02.22 09:20:17 (+0000)  main      departureStationName = APIElements['soap:Envelope']['soap:Body']['GetDepBoardWithDetailsResponse']['GetStationBoardResult']['lt4:locationName']
17.02.22 09:20:17 (+0000)  main  KeyError: 'soap:Envelope'

I wonder if anyone else is having an issue with this. Could someone with more knowledge on these matters than I have please advise ?

Hey @GOTO_GOSUB thanks for your email and post here.

I am not sure why your display stopped working in the beginning so let’s focus efforts on why it’s not working now after you’ve updated everything. I can see from the logs that you’re now running v0.3.0 which is great.

The first thing to note is that the API provider changed back in v0.1.0 (changelog), as the TransportAPI no longer provides an adequate service for this use case for free. The project was changed to run from the National Rail Enquiries OpenLDBWS API, of which one of their terms of use is to show that message that you’re now seeing.

It requires that you register with them and get a new API key - note that this time there’s only a key, no application ID, and so the variable name has changed slightly. See the configuration section in the docs for the updated variable names. Everything else I think should remain the same but just have a quick check of your environment variables in balenaCloud against the table in the docs.

Incidentally an issue was raised on GitHub just a couple of hours ago pointing out that this change from one API to another needs to be documented better. I agree and that’s my bad in the first place - it should have been rolled out as a major breaking change rather than a minor.

Hopefully after doing that you’ll be up and running again after this but let me know if not.

1 Like

Hi @chrisys ,

Thank you for your prompt response and the detailed description of the resolution. I am pleased to say that has resolved the issue.

As you said earlier, I will not worry about why it suddenly failed before - especially since NRE are so generous with their usage cap. It sounds like I was due for an upgrade anyway.

Thanks again, I would have missed my departure board had I not have been able to get it working.

1 Like