N = 1 #Initialized at 1 because it counts the number of returns : "\n", if there is only 1 waypoint it would be outputting 0 for i in waypoints_text: #Counts the number of waypoints waypoint = ...
Note that, for the first time that you run the app, your device should be connected to internet, in order to have the app be registered. For the any number of further run, there is no need for ...