Closed regis57 closed 6 years ago
I think the flight aware api feature is still buggy, I'm actively working on it.
As far as log files, the script prints to stdout. I'm not sure how you're running it, but lately I've been running the script like this:
nohup python3 tracker.py > logs/out.log 2>1 </dev/null &
This runs the script fully detached from the terminal and redirects both stdout and stderr to a logs/out.log file. Then you can run tail -f logs/out.log
and it will print what's actively running, or you can use the grep
command to search through the file.
When there's a tweet if the request to flight aware succeeds it prints out the decoded json message. If you see a full decoded json message in the output but it's not tweeting the route information please copy and paste that json message here. I've already seen some discrepancy between messages in the US and Europe.
Same problem here. Data gets fetched, but still the 'normal' tweet is published. Got three flights here: https://pastebin.com/z5sD7P8B
Still it's an awesome software. Thanks!
I see the problem right away. The request to flight aware returns a list of flights. Most of the flights returned are things that have already arrived, or are scheduled. But typically one of the flights is currently live or enroute. To see which flight to use in the tweet it checks the "status". Currently my script looks for any status that begins with "En" or "On". But apparently I need to look for status that begin with "In" as well, since in your paste bin the status I'm looking for are these: In der Luft
and In der Luft / Pünktlich
Just pushed the change now... @sfeh922 and @regis57 let me know if it's not working and I'll reopen the issue.
Now it's working for me. Thanks. Didn't see before, how the script knows which tweet-template to publish. Because the fa-API answers in the language set in the fa-account, it might be a good idea, to put a note in the config.ini.
I got my api threashold increasing everyday, but each twit are since 3 days the one without route. What log file I can check to understand what is going on?