Hello!
I've noticed that traffic/pyopensky is failing to retrieve live states from the REST API:
from traffic.data import opensky
import logging
logging.basicConfig(level=logging.DEBUG)
sv = opensky.api_states()
Gives:
DEBUG:urllib3.connectionpool:Resetting dropped connection: opensky-network.org
DEBUG:urllib3.connectionpool:https://opensky-network.org:443 "GET /api/states/all HTTP/1.1" 301 169
DEBUG:urllib3.connectionpool:Resetting dropped connection: api.opensky-network.org
DEBUG:urllib3.connectionpool:https://api.opensky-network.org:443 "GET /api/states/all HTTP/1.1" 429 17
WARNING:pyopensky.rest:Retrying in 10 seconds... {retry} more time
This continues for some time and then eventually results in an error. Weirdly, at some times of day (before 09 and after 17 UTC) it seems to work OK.
Any ideas what could be going wrong?
Please follow these steps to make it more efficient to solve your issue:
[x] Search for duplicate issues.
[x] Use the latest version of traffic, ideally the HEAD of the github, and activate the DEBUG logging level.
[x] Describe how to reproduce the bug and include the full code and data to reproduce it, ideally using a sample trajectory from the library. Sample trajectories are extensively used in the tests suite.
[x] Limit the output of your exceptions to what is strictly necessary.
You may activate the DEBUG level with the following snippet:
Hello! I've noticed that traffic/pyopensky is failing to retrieve live states from the REST API:
Gives:
This continues for some time and then eventually results in an error. Weirdly, at some times of day (before 09 and after 17 UTC) it seems to work OK.
Any ideas what could be going wrong?
Please follow these steps to make it more efficient to solve your issue:
DEBUG
logging level.You may activate the
DEBUG
level with the following snippet: