Max Retries / Doesn't show what's flying above
Closed this issue · 4 comments
Hello! I'll include my config (minus location) and also the log. Thanks!
config:
ZONE_HOME = {
"tl_y": xxx, # Top-Left Latitude (deg)
"tl_x": xxx, # Top-Left Longitude (deg)
"br_y": xxx, # Bottom-Right Latitude (deg)
"br_x": xxx # Bottom-Right Longitude (deg)
}
LOCATION_HOME = [
xxx, # Latitude (deg)
Xxx, # Longitude (deg)
0.313 # Altitude (km)
]
TEMPERATURE_LOCATION = “xxx”
OPENWEATHER_API_KEY = “xxx” # Get an API key from https://openweathermap.org/price
TEMPERATURE_UNITS = "imperial"
MIN_ALTITUDE = 0
BRIGHTNESS = 80
GPIO_SLOWDOWN = 0
JOURNEY_CODE_SELECTED = ""
JOURNEY_BLANK_FILLER = " ? "
plane.log:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 169, in _new_conn
conn = connection.create_connection(
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 73, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/lib/python3.9/socket.py", line 953, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1012, in _validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 353, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 181, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0xb5babb38>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='data-live.flightradar24.com', port=443): Max retries exceeded with url: /zones/fcgi/feed.js?faa=1&satellite=1&mlat=1&flarm=1&adsb=1&gn>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/home/stickyricebandit/its-a-plane-python/utilities/overhead.py", line 86, in _grab_data
flights = self._api.get_flights(bounds=bounds)
File "/usr/local/lib/python3.9/dist-packages/FlightRadar24/api.py", line 96, in get_flights
request = APIRequest(Core.real_time_flight_tracker_data_url, request_params, Core.json_headers)
File "/usr/local/lib/python3.9/dist-packages/FlightRadar24/request.py", line 22, in init
self.__response = self.__send_request(url, params, headers)
File "/usr/local/lib/python3.9/dist-packages/FlightRadar24/request.py", line 31, in __send_request
return requests.get(url, headers = headers)
File "/usr/lib/python3/dist-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='data-live.flightradar24.com', port=443): Max retries exceeded with url: /zones/fcgi/feed.js?faa=1&satellite=1&mlat=1&flarm=1&adsb=1>
I didn't even think to look there, looks like they're having issues, thanks Colin!
I wanted to update the issue and update what I found, turns out the log was from when the pi is booting up and trying to connect to wifi, hence the errors.
Also, I figured out in the config of overhead.py that it has a max of 10000 ft, I don't live near an airport so it wasn't displaying regular commercial fights but I did notice it displayed smaller aircraft flying above. So everything is good, I updated the max altitude to 50,000 ft (normally 30,000 to 45,000 ft) and now I can see aircraft that are at normal cruising altitude.