You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
If I try to use the api_states call to retrieve live information from the opensky data via traffic then I get this error message:
Retrying in 10 seconds... {retry} more time
Retrying in 10 seconds... {retry} more time
Retrying in 10 seconds... {retry} more time
Retrying in 10 seconds... {retry} more time
Retrying in 10 seconds... {retry} more time
Client error '401 ' for url 'https://opensky-network.org/api/states/all'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401
Retrying in 10 seconds... {retry} more time
Retrying in 10 seconds... {retry} more time
Retrying in 10 seconds... {retry} more time
Retrying in 10 seconds... {retry} more time
Retrying in 10 seconds... {retry} more time
And the states are not retrieved.
My code is:
from traffic.data import opensky
sv = opensky.api_states()
This is not an issue with my machine being blocked by opensky as I can use curl https://opensky-network.org/api/states/all to successfully retrieve the states. I have added my login information to the traffic.conf file and have also tried without my credentials being in that file.
Please follow these steps to make it more efficient to solve your issue:
Search for duplicate issues.
Use the latest version of traffic, ideally the HEAD of the github, and activate the DEBUG logging level.
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.
Limit the output of your exceptions to what is strictly necessary.
You may activate the DEBUG level with the following snippet:
For what it's worth, I am aware of: #413, which is also mine, but this appears to be a different issue. In that case I couldn't retrieve the states via curl and so it was an opensky issue. Here I can successfully retrieve the states outside of traffic so it's a library problem I think. Hence opening a new issue - apologies if you would have preferred I re-opn the old issue!
Hi Simon, that is weird as I cannot reproduce on my side.
Are you using the latest version of pyopensky?
If yes, can you check with the HEAD of the repository?
Hi @simonrp84 I published this morning a new version of pyopensky (wrapped by traffic) to better handle this kind of errors, can you try again? If it fails, please reopen another issue in pyopensky.
Hello!
If I try to use the
api_states
call to retrieve live information from the opensky data viatraffic
then I get this error message:And the states are not retrieved.
My code is:
This is not an issue with my machine being blocked by opensky as I can use
curl https://opensky-network.org/api/states/all
to successfully retrieve the states. I have added my login information to thetraffic.conf
file and have also tried without my credentials being in that file.Any suggestions for what could be wrong?
If helpful, the debug info is:
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:The text was updated successfully, but these errors were encountered: