syps / alexa-airplane-spotter Goto Github PK
View Code? Open in Web Editor NEWAlexa Skill and Services for the "What Plane Is That?" Skill
Alexa Skill and Services for the "What Plane Is That?" Skill
Hi There,
Rebooted my rPi and came back with a fun issue. After upgrading dump1090-mutability, there's no longer a data.json file. I moved to the closest file that is referenced in the API, which is data/aircraft.json - https://github.com/mutability/dump1090/blob/master/net_io.c#L1364 it's formatted totally differently. To resolve the issue I ended up building an older version of dump1090 from source that contained the data.json file. No data.json file triggers an issue on https://github.com/Syps/alexa-airplane-spotter/blob/master/nearby.py#L157. data/aircraft.json does not work as a sub.
Hi There, thanks for putting this together. I'm very close to having it working based on a lot of hard work of yours. It's very cool and I'm looking forward to getting it going. I've overcome a few little install issues, but can't seem to figure out this one.
server.js is successfully invoking nearby.py which is calling scraper.py I get the below Python Traceback when a plane is found. When no planes are found, the node.js remains up correctly.
EG Plane/URL being located; url=https://www.flightradar24.com/data/aircraft/VH-EBD
----- Python Traceback -----
File "live_speech_output.py", line 40, in <module>
get_output_speech()
File "live_speech_output.py", line 30, in get_output_speech
flight = nearby()
File "/home/pi/alexa-airplane-spotter/nearby.py", line 171, in nearby
return scrape.flight_info(flight) if flight else None
File "/home/pi/alexa-airplane-spotter/scrape.py", line 108, in flight_info
route_results = scrape_route_data(reg_no)
File "/home/pi/alexa-airplane-spotter/scrape.py", line 64, in scrape_route_data
depart = route_row.findAll('td')[2].find('span').text
user@raspberrypi:/home/pi/alexa-airplane-spotter$ python nearby.py
Traceback (most recent call last):
File "nearby.py", line 175, in <module>
nearby()
File "nearby.py", line 171, in nearby
return scrape.flight_info(flight) if flight else None
File "/home/pi/alexa-airplane-spotter/scrape.py", line 107, in flight_info
route_results = scrape_route_data(reg_no)
File "/home/pi/alexa-airplane-spotter/scrape.py", line 63, in scrape_route_data
depart = route_row.findAll('td')[2].find('span').text
AttributeError: 'NoneType' object has no attribute 'findAll'
route_row is returning None, meaning route_row.findAll is bombing. The URL being access, as seen via logger.info (URL sample above), is correct and I can see the required tr/td info...
I might dig into this a little more, but am not feeling too confident on this. Greatly appreciate a hand on the scraping..
Unrelated, but whilst opening an issue, in the blog post I saw no mention of OpenSky or it's usage, which is still in the page and was a bit of a curveball, but no biggie.
Thanks again/in advance!
How did you install mongodb on your Raspberry Pi 3?
The Mongodb site only has packages for 64-bit ARM for Ubuntu?
Did you compile from source?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.